Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: upgrade angular cli to 10.1.2
- Loading branch information
Showing
9 changed files
with
1,454 additions
and
1,086 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"outDir": "../out-tsc/e2e", | ||
"module": "commonjs", | ||
"target": "es2018", | ||
"types": [ | ||
"jasmine", | ||
"jasminewd2", | ||
"node" | ||
] | ||
"types": ["jasmine", "jasminewd2", "node"] | ||
} | ||
} |
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,133 +1,132 @@ | ||
const { src, dest, series } = require('gulp'); | ||
const each = require('gulp-each'); | ||
|
||
const pkg = require('./package.json'); | ||
|
||
const DEST = 'dist/schematics'; | ||
const NG_ADD = DEST + '/ng-add'; | ||
const FILES = NG_ADD + '/files'; | ||
|
||
// .vscode | ||
function copyDotVscode(cb) { | ||
return src(['.vscode/*']).pipe(dest(`${FILES}/.vscode`)); | ||
} | ||
|
||
// root | ||
function copyRoot(cb) { | ||
return src([ | ||
'.prettierignore', | ||
'.prettierrc', | ||
'.stylelintrc', | ||
'LICENSE', | ||
'proxy.config.js', | ||
'tsconfig.json', | ||
'tsconfig.app.json', | ||
'tsconfig.base.json', | ||
'tslint.json', | ||
]).pipe(dest(`${FILES}/`)); | ||
} | ||
|
||
// src/ | ||
function copySrcRoot(cb) { | ||
return src(['src/hmr.ts', 'src/styles.scss', 'src/typings.d.ts']).pipe(dest(`${FILES}/src`)); | ||
} | ||
|
||
// src/assets | ||
function copyAssets(cb) { | ||
return src([ | ||
'src/assets/**/*', | ||
'!src/assets/data/menu.json', | ||
'!src/assets/images/avatars/**', | ||
'!src/assets/images/pixabay/**', | ||
]).pipe(dest(`${FILES}/src/assets`)); | ||
} | ||
|
||
// src/styles | ||
function copyStyles(cb) { | ||
return src(['src/styles/**/*', '!src/styles/_app-theme.scss', '!src/styles/theming.scss']).pipe( | ||
dest(`${FILES}/src/styles`) | ||
); | ||
} | ||
|
||
// src/environments | ||
function copyEnvironments(cb) { | ||
return src(['src/environments/*']).pipe(dest(`${FILES}/src/environments`)); | ||
} | ||
|
||
// src/app/ | ||
function copySrcApp(cb) { | ||
return src([ | ||
'src/app/**/*', | ||
'!src/app/core/settings.ts', | ||
'!src/app/routes/**/*', | ||
'!src/app/shared/shared.module.ts', | ||
'!src/app/theme/admin-layout/*.html', | ||
'!src/app/theme/header/*.html', | ||
'!src/app/theme/header/github.*', | ||
'!src/app/theme/customizer/**', | ||
'!src/app/theme/theme.module.ts', | ||
'!src/app/app.module.ts', | ||
]).pipe(dest(`${FILES}/src/app`)); | ||
} | ||
|
||
// src/app/routes | ||
function copySrcAppRoutes(cb) { | ||
return src(['src/app/routes/sessions/**/*']).pipe(dest(`${FILES}/src/app/routes/sessions`)); | ||
} | ||
|
||
// Replace version placeholder | ||
function updateVersions(cb) { | ||
return src([`${NG_ADD}/packages.js`, `${NG_ADD}/packages.ts`]) | ||
.pipe( | ||
each(function (content, file, callback) { | ||
[ | ||
'@angular/cdk', | ||
'@angular/flex-layout', | ||
'@angular/material', | ||
'@angular/material-moment-adapter', | ||
'@mat-datetimepicker/core', | ||
'@mat-datetimepicker/moment', | ||
'@ng-matero/extensions', | ||
'@ng-select/ng-select', | ||
'@ngx-formly/core', | ||
'@ngx-formly/material', | ||
'@ngx-translate/core', | ||
'@ngx-translate/http-loader', | ||
'moment', | ||
'ngx-progressbar', | ||
'ngx-toastr', | ||
'photoviewer', | ||
'screenfull', | ||
'@angularclass/hmr', | ||
'parse5', | ||
'prettier', | ||
'stylelint', | ||
'stylelint-config-recommended-scss', | ||
'stylelint-config-standard', | ||
'stylelint-scss', | ||
].forEach(name => { | ||
if (!pkg.dependencies[name] && !pkg.devDependencies[name]) { | ||
cb(`${name} not found!`); | ||
} | ||
content = content.replace( | ||
`${name}@0.0.0-PLACEHOLDER`, | ||
`${name}@${pkg.dependencies[name] || pkg.devDependencies[name]}` | ||
); | ||
}); | ||
callback(null, content); | ||
}) | ||
) | ||
.pipe(dest(NG_ADD)); | ||
} | ||
|
||
exports.default = series( | ||
copyDotVscode, | ||
copyRoot, | ||
copySrcRoot, | ||
copyAssets, | ||
copyStyles, | ||
copyEnvironments, | ||
copySrcApp, | ||
copySrcAppRoutes, | ||
updateVersions | ||
); | ||
const { src, dest, series } = require('gulp'); | ||
const each = require('gulp-each'); | ||
|
||
const pkg = require('./package.json'); | ||
|
||
const DEST = 'dist/schematics'; | ||
const NG_ADD = DEST + '/ng-add'; | ||
const FILES = NG_ADD + '/files'; | ||
|
||
// .vscode | ||
function copyDotVscode(cb) { | ||
return src(['.vscode/*']).pipe(dest(`${FILES}/.vscode`)); | ||
} | ||
|
||
// root | ||
function copyRoot(cb) { | ||
return src([ | ||
'.prettierignore', | ||
'.prettierrc', | ||
'.stylelintrc', | ||
'LICENSE', | ||
'proxy.config.js', | ||
'tsconfig.json', | ||
'tsconfig.app.json', | ||
'tslint.json', | ||
]).pipe(dest(`${FILES}/`)); | ||
} | ||
|
||
// src/ | ||
function copySrcRoot(cb) { | ||
return src(['src/hmr.ts', 'src/styles.scss', 'src/typings.d.ts']).pipe(dest(`${FILES}/src`)); | ||
} | ||
|
||
// src/assets | ||
function copyAssets(cb) { | ||
return src([ | ||
'src/assets/**/*', | ||
'!src/assets/data/menu.json', | ||
'!src/assets/images/avatars/**', | ||
'!src/assets/images/pixabay/**', | ||
]).pipe(dest(`${FILES}/src/assets`)); | ||
} | ||
|
||
// src/styles | ||
function copyStyles(cb) { | ||
return src(['src/styles/**/*', '!src/styles/_app-theme.scss', '!src/styles/theming.scss']).pipe( | ||
dest(`${FILES}/src/styles`) | ||
); | ||
} | ||
|
||
// src/environments | ||
function copyEnvironments(cb) { | ||
return src(['src/environments/*']).pipe(dest(`${FILES}/src/environments`)); | ||
} | ||
|
||
// src/app/ | ||
function copySrcApp(cb) { | ||
return src([ | ||
'src/app/**/*', | ||
'!src/app/core/settings.ts', | ||
'!src/app/routes/**/*', | ||
'!src/app/shared/shared.module.ts', | ||
'!src/app/theme/admin-layout/*.html', | ||
'!src/app/theme/header/*.html', | ||
'!src/app/theme/header/github.*', | ||
'!src/app/theme/customizer/**', | ||
'!src/app/theme/theme.module.ts', | ||
'!src/app/app.module.ts', | ||
]).pipe(dest(`${FILES}/src/app`)); | ||
} | ||
|
||
// src/app/routes | ||
function copySrcAppRoutes(cb) { | ||
return src(['src/app/routes/sessions/**/*']).pipe(dest(`${FILES}/src/app/routes/sessions`)); | ||
} | ||
|
||
// Replace version placeholder | ||
function updateVersions(cb) { | ||
return src([`${NG_ADD}/packages.js`, `${NG_ADD}/packages.ts`]) | ||
.pipe( | ||
each(function (content, file, callback) { | ||
[ | ||
'@angular/cdk', | ||
'@angular/flex-layout', | ||
'@angular/material', | ||
'@angular/material-moment-adapter', | ||
'@mat-datetimepicker/core', | ||
'@mat-datetimepicker/moment', | ||
'@ng-matero/extensions', | ||
'@ng-select/ng-select', | ||
'@ngx-formly/core', | ||
'@ngx-formly/material', | ||
'@ngx-translate/core', | ||
'@ngx-translate/http-loader', | ||
'moment', | ||
'ngx-progressbar', | ||
'ngx-toastr', | ||
'photoviewer', | ||
'screenfull', | ||
'@angularclass/hmr', | ||
'parse5', | ||
'prettier', | ||
'stylelint', | ||
'stylelint-config-recommended-scss', | ||
'stylelint-config-standard', | ||
'stylelint-scss', | ||
].forEach(name => { | ||
if (!pkg.dependencies[name] && !pkg.devDependencies[name]) { | ||
cb(`${name} not found!`); | ||
} | ||
content = content.replace( | ||
`${name}@0.0.0-PLACEHOLDER`, | ||
`${name}@${pkg.dependencies[name] || pkg.devDependencies[name]}` | ||
); | ||
}); | ||
callback(null, content); | ||
}) | ||
) | ||
.pipe(dest(NG_ADD)); | ||
} | ||
|
||
exports.default = series( | ||
copyDotVscode, | ||
copyRoot, | ||
copySrcRoot, | ||
copyAssets, | ||
copyStyles, | ||
copyEnvironments, | ||
copySrcApp, | ||
copySrcAppRoutes, | ||
updateVersions | ||
); |
Oops, something went wrong.