Skip to content

Commit

Permalink
feat(all): support angular6
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed May 13, 2018
1 parent adfc214 commit e2bf223
Show file tree
Hide file tree
Showing 112 changed files with 880 additions and 706 deletions.
99 changes: 0 additions & 99 deletions .angular-cli.json

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ coverage
site/app/routes/gen
.idea
debug.log
yarn-error.log
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sudo: required
language: node_js
node_js:
- "8.9.0"
- "8.11"

env:
- TASK=release
Expand Down Expand Up @@ -32,6 +32,7 @@ before_script:
- npm install -g yarn

script:
- npm run fix-v6
- npm run $TASK
- |
if [ "$TASK" = "test" ]; then
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.compile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /usr/src/app

COPY package.json package.json

RUN yarn
RUN npm i

COPY . .

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ delong is a production-ready solution for admin business components packages, Bu

## Architecture

![Architecture](https://github.com/cipchk/delon/blob/master/_screenshot/architecture.png)
![Architecture](https://raw.githubusercontent.com/cipchk/delon/master/_screenshot/architecture.png)

## App Shots

Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

Binary file modified _screenshot/architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
223 changes: 223 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"delon": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/assets"
],
"styles": [
"src/styles.less"
],
"scripts": [
"node_modules/@antv/g2/dist/g2.min.js",
"node_modules/@antv/data-set/dist/data-set.min.js",
"node_modules/@antv/g2-plugin-slider/dist/g2-plugin-slider.min.js",
"node_modules/ajv/dist/ajv.bundle.js",
"node_modules/qrious/dist/qrious.min.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "delon:build"
},
"configurations": {
"production": {
"browserTarget": "delon:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "delon:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "packages/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "packages/tsconfig.spec.json",
"scripts": [
"node_modules/@antv/g2/dist/g2.min.js",
"node_modules/@antv/data-set/dist/data-set.min.js",
"node_modules/@antv/g2-plugin-slider/dist/g2-plugin-slider.min.js",
"node_modules/ajv/dist/ajv.bundle.js",
"node_modules/qrious/dist/qrious.min.js"
],
"assets": [
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json"
],
"exclude": [
"**/node_modules/**",
"**/packages/cli/**"
]
}
}
}
},
"delon-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "delon:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [],
"exclude": [
"**/node_modules/**",
"**/packages/cli/**"
]
}
}
}
},
"site": {
"root": "",
"sourceRoot": "site",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "site/dist",
"index": "site/index.html",
"main": "site/main.ts",
"tsConfig": "site/tsconfig.app.json",
"polyfills": "site/polyfills.ts",
"assets": [
"site/assets"
],
"styles": [
"site/styles.less"
],
"scripts": [
"node_modules/enquire.js/dist/enquire.js",
"node_modules/@antv/g2/dist/g2.min.js",
"node_modules/@antv/data-set/dist/data-set.min.js",
"node_modules/@antv/g2-plugin-slider/dist/g2-plugin-slider.min.js",
"node_modules/ajv/dist/ajv.bundle.js",
"node_modules/qrious/dist/qrious.min.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "site/environments/environment.ts",
"with": "site/environments/environment.prod.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "site:build"
},
"configurations": {
"production": {
"browserTarget": "site:build:production"
}
}
}
}
},
"site-e2e": {
"root": "",
"sourceRoot": "",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "site:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [],
"exclude": [
"**/node_modules/**",
"**/packages/cli/**"
]
}
}
}
}
},
"defaultProject": "delon",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "less"
},
"@schematics/angular:directive": {
"prefix": "app"
}
}
}
5 changes: 2 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ PACKAGES=(acl
auth
cache
mock
form
cli)
form)
NODE_PACKAGES=(cli)

#######################################
Expand Down Expand Up @@ -101,7 +100,7 @@ buildLess() {
echo 'fix abc components import paths...'
sed -i -r "s/..\/..\/..\/theme/..\/..\/..\/..\/theme/g" `grep ..\/..\/..\/theme -rl ${DIST_DIR}/packages-dist/abc/`
echo 'fix zorro paths...'
sed -i -r "s/~ng-zorro-antd/..\/..\/..\/ng-zorro-antd/g" `grep ~ng-zorro-antd -rl ${DIST_DIR}/packages-dist/theme/styles/`
# sed -i -r "s/~ng-zorro-antd/..\/..\/..\/ng-zorro-antd/g" `grep ~ng-zorro-antd -rl ${DIST_DIR}/packages-dist/theme/styles/`
}

containsElement () {
Expand Down
Loading

0 comments on commit e2bf223

Please sign in to comment.