Skip to content

Commit

Permalink
feat(schematice): add generate color less (#196)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Oct 3, 2018
1 parent 299e877 commit d7f7da6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/schematics/application/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,11 @@ function addDependenciesToPackageJson(options: ApplicationOptions) {
),
);
// ng-alain
addPackageToPackageJson(host, `ng-alain@${VERSION}`, 'devDependencies');
addPackageToPackageJson(host, [
`ng-alain@${VERSION}`,
// color-less
`less-bundle-promise@^1.0.7`,
], 'devDependencies');
// i18n
if (options.i18n) {
addPackageToPackageJson(host, [
Expand All @@ -109,6 +113,7 @@ function addRunScriptToPackageJson() {
json.scripts['build'] = `ng build --prod --build-optimizer`;
json.scripts['analyze'] = `ng build --prod --build-optimizer --stats-json`;
json.scripts['test-coverage'] = `ng test --code-coverage --watch=false`;
json.scripts['color-less'] = `node scripts/color-less.js`;
overwritePackage(host, json);
return host;
};
Expand Down Expand Up @@ -168,6 +173,7 @@ function addCodeStylesToPackageJson() {
],
'*.ts': ['npm run lint:ts', 'prettier --write', 'git add'],
'*.less': ['npm run lint:style', 'prettier --write', 'git add'],
'ignore': ['src/assets/*'],
};
overwritePackage(host, json);
// tslint
Expand Down
1 change: 1 addition & 0 deletions scripts/ci/build-schematics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ copyFiles() {
"${1}.stylelintrc|${2}application/files/root/__dot__stylelintrc"
# ci
"${1}.vscode|${2}application/files/root/__dot__vscode"
"${1}scripts/color-less.js|${2}application/files/root/scripts"
# LICENSE
"${1}LICENSE|${2}application/files/root"
"${1}README.md|${2}application/files/root"
Expand Down
3 changes: 3 additions & 0 deletions scripts/ci/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,6 @@ travisFoldStart "publish.dist"

echo "Published package artifacts for ${packageName}#${buildVersionName} into ${branchName}"
travisFoldEnd "publish.dist"

echo "Download link:"
echo "https://github.com/ng-alain/delon-builds/archive/${buildTagName}.zip"

0 comments on commit d7f7da6

Please sign in to comment.