-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ng-packagr): Add Support for ng-packagr #27
- Loading branch information
1 parent
ee925ce
commit 2eef386
Showing
9 changed files
with
39 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
# Clear deploy/ so that we guarantee there are no stale artifacts. | ||
echo "Cleaning deploy/" | ||
echo 'Clean up' | ||
rm -rf ./deploy | ||
|
||
# Perform a build. | ||
gulp build | ||
echo "SASS compiled..." | ||
|
||
# Prepare for aot | ||
gulp prepare-aot | ||
echo "Preparing files for AoT build" | ||
|
||
# AoT compilation | ||
npm run aot | ||
echo "Compiled TS and generated *.metadata.json files..." | ||
|
||
# copy README.md into deploy | ||
cp -rf README.md deploy/platform/code-editor/ | ||
./node_modules/.bin/ng-packagr -p ./src/platform/code-editor/ng-package.js | ||
|
||
# copy Monaco | ||
mkdir deploy/platform/code-editor/assets | ||
mkdir deploy/platform/code-editor/assets/monaco | ||
cp -rf node_modules/monaco-editor/min/* deploy/platform/code-editor/assets/monaco/ | ||
|
||
# Clean source .ts files | ||
cd deploy/ | ||
find . -name "*.ts" ! -name "*.d.ts" -type f -delete | ||
cd .. | ||
echo "Remove source .ts files so they arent published" | ||
|
||
# Inline the css and html into the component files. | ||
gulp inline-resource-files | ||
echo "Resources inlined..." | ||
|
||
# Bundle | ||
gulp rollup-code | ||
echo "Bundled..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export { TdCodeEditorComponent } from './code-editor.component'; | ||
export { CovalentCodeEditorModule } from './code-editor.module'; | ||
export * from './public-api'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
let ngPackageSettings = require('../ng-package-common.js'); | ||
ngPackageSettings["dest"] = "../../../deploy/platform/code-editor" | ||
module.exports = ngPackageSettings; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { TdCodeEditorComponent } from './code-editor.component'; | ||
export { CovalentCodeEditorModule } from './code-editor.module'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Configuration for IDEs only. | ||
{ | ||
"extends": "../../tsconfig.app.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"baseUrl": ".", | ||
"paths": { | ||
"@covalent/code-editor/*": [ | ||
"./*" | ||
] | ||
} | ||
}, | ||
"include": [ | ||
"./**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = | ||
{ | ||
"lib": { | ||
"entryFile": "index.ts", | ||
"umdModuleIds": { | ||
"@covalent/code-editor": "covalent.code-editor" | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters