Skip to content

Commit

Permalink
Merge pull request #66 from czeckd/maps
Browse files Browse the repository at this point in the history
Combine tmp/ with dist/
  • Loading branch information
czeckd authored Jan 31, 2018
2 parents e9c6401 + aefc519 commit 2ce40c8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-dual-listbox",
"description": "Angular 4+ component for a dual listbox control.",
"version": "4.5.0",
"version": "4.5.1",
"repository": {
"type": "git",
"url": "https://github.com/czeckd/angular-dual-listbox.git"
Expand All @@ -12,10 +12,10 @@
"author": "David Czeck",
"license": "MIT",
"scripts": {
"start": "rimraf runt && npm run dist && tsc && concurrently \"tsc -w\" \"lite-server\" ",
"start": "npm run clean && npm run dist && tsc && concurrently \"tsc -w\" \"lite-server\" ",
"tsc": "tsc",
"tsc:w": "tsc -w",
"clean": "rimraf runt tmp dist",
"clean": "rimraf runt dist",
"dist": "tools/mkdist",
"lint": "tslint -c tslint.json -t verbose lib/**/*.ts app/**/*.ts || true",
"lite": "lite-server"
Expand Down
2 changes: 1 addition & 1 deletion systemjs.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// map tells the System loader where to look for things
var map = {
'app': 'runt',
'app': 'runt/app',
'rxjs': 'node_modules/rxjs',
'@angular': 'node_modules/@angular',
'angular-dual-listbox': 'dist'
Expand Down
4 changes: 2 additions & 2 deletions tools/inliner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const template = readFileSync('lib/dual-list.component.html');
component = component.replace(/templateUrl:.*/, `template: \`\n${template}\n\``);


const dir = './tmp';
const dir = './dist';
if (!existsSync(dir)) {
mkdirSync(dir);
}

writeFileSync('tmp/dual-list.component.ts', component);
writeFileSync('dist/dual-list.component.ts', component);
//createReadStream('lib/angular-dual-listbox.module.ts').pipe(createWriteStream('tmp/angular-dual-listbox.module.ts'));
//createReadStream('lib/basic-list.ts').pipe(createWriteStream('tmp/basic-list.ts'));
//createReadStream('lib/index.ts').pipe(createWriteStream('tmp/index.ts'));
Expand Down
7 changes: 3 additions & 4 deletions tools/mkdist
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
rimraf tmp dist && \
echo 'Inlining...' && ts-node tools/inliner.ts && \
echo 'Sourcing...' && cp lib/angular-dual-listbox.module.ts lib/basic-list.ts lib/index.ts tmp/ && \
rimraf dist && \
echo 'Inlining...' && ts-node tools/inliner.ts && \
echo 'Sourcing...' && cp lib/angular-dual-listbox.module.ts lib/basic-list.ts lib/index.ts dist/ && \
echo 'Transpiling...' && tsc -p tsconfig-esm.json && \
echo 'Rolling...' && rollup --silent -c rollup.config.js dist/index.js > dist/angular-dual-listbox.bundle.js && \
echo 'Angularizing...' && ngc -p tsconfig-esm.json && \
echo 'Packaging...' && ts-node tools/packager.ts && \
echo 'Licensing...' && cp README.md LICENSE dist


8 changes: 4 additions & 4 deletions tsconfig-esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
]
},
"files": [
"tmp/angular-dual-listbox.module.ts",
"tmp/basic-list.ts",
"tmp/dual-list.component.ts",
"tmp/index.ts"
"dist/angular-dual-listbox.module.ts",
"dist/basic-list.ts",
"dist/dual-list.component.ts",
"dist/index.ts"
],
"angularCompilerOptions": {
"skipTemplateCodegen": true
Expand Down

0 comments on commit 2ce40c8

Please sign in to comment.