-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support angular 6, releases: 2.0.0
- Loading branch information
Showing
67 changed files
with
8,845 additions
and
12,795 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,20 +1,43 @@ | ||
# Dependency directory | ||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git | ||
# See http://help.github.com/ignore-files/ for more about ignoring files. | ||
|
||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
/__gen_lib | ||
/publish-es5 | ||
/publish-es2015 | ||
/publish | ||
|
||
# dependencies | ||
/node_modules | ||
npm-debug.log | ||
.tmp | ||
|
||
# WebStorm | ||
.idea | ||
.vscode | ||
# IDEs and editors | ||
/.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# ignore build and dist for now | ||
/demo/dist | ||
/dist | ||
/coverage | ||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# ignore inline compiling | ||
/logs | ||
# misc | ||
/.sass-cache | ||
/connect.lock | ||
/coverage | ||
/libpeerconnection.log | ||
npm-debug.log | ||
yarn-error.log | ||
testem.log | ||
/typings | ||
|
||
# AoT generated files | ||
factories | ||
# System Files | ||
.DS_Store | ||
Thumbs.db |
File renamed without changes.
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,5 @@ | ||
{ | ||
"printWidth": 80, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
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,34 @@ | ||
{ | ||
"extends": { | ||
"stylelint-config-standard", | ||
"./node_modules/prettier-stylelint/config.js" | ||
}, | ||
"rules": { | ||
"comment-empty-line-before": null, | ||
"declaration-empty-line-before": null, | ||
"function-comma-newline-after": null, | ||
"function-name-case": null, | ||
"function-parentheses-newline-inside": null, | ||
"function-max-empty-lines": null, | ||
"function-whitespace-after": null, | ||
"indentation": null, | ||
"number-leading-zero": null, | ||
"number-no-trailing-zeros": null, | ||
"rule-empty-line-before": null, | ||
"selector-combinator-space-after": null, | ||
"selector-list-comma-newline-after": null, | ||
"selector-pseudo-element-colon-notation": null, | ||
"unit-no-unknown": null, | ||
"value-list-max-empty-lines": null, | ||
"selector-type-no-unknown": null, | ||
"selector-pseudo-element-no-unknown": [ | ||
true, | ||
{ | ||
"ignorePseudoElements": [ | ||
"ng-deep" | ||
] | ||
} | ||
], | ||
"no-descending-specificity": null | ||
} | ||
} |
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,12 +1,33 @@ | ||
language: node_js | ||
node_js: | ||
- "6" | ||
|
||
before_install: | ||
- export CHROME_BIN=chromium-browser | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
|
||
script: | ||
- npm run pretest | ||
- npm run test | ||
sudo: required | ||
language: node_js | ||
node_js: | ||
- "8.11.0" | ||
|
||
env: | ||
- TASK=test | ||
- TASK=lint | ||
- TASK=build | ||
- TASK=site:build | ||
|
||
addons: | ||
apt: | ||
sources: | ||
- google-chrome | ||
packages: | ||
- google-chrome-stable | ||
- google-chrome-beta | ||
|
||
git: | ||
depth: 1 | ||
|
||
before_install: | ||
- export CHROME_BIN=chromium-browser | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
|
||
script: | ||
- npm run $TASK | ||
- | | ||
if [ "$TASK" = "test" ]; then | ||
cat ./coverage/lcov.info | ./node_modules/.bin/codecov | ||
fi |
This file was deleted.
Oops, something went wrong.
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
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,113 @@ | ||
{ | ||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json", | ||
"version": 1, | ||
"newProjectRoot": "projects", | ||
"projects": { | ||
"angular-baidu-maps": { | ||
"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.json", | ||
"polyfills": "src/polyfills.ts", | ||
"assets": ["src/assets"], | ||
"styles": [], | ||
"scripts": [] | ||
}, | ||
"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": "angular-baidu-maps:build" | ||
}, | ||
"configurations": { | ||
"prod": { | ||
"browserTarget": "angular-baidu-maps:build:prod" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "angular-baidu-maps:build" | ||
} | ||
}, | ||
"test": { | ||
"builder": "@angular-devkit/build-angular:karma", | ||
"options": { | ||
"main": "lib/test.ts", | ||
"tsConfig": "lib/tsconfig.spec.json", | ||
"karmaConfig": "karma.conf.js", | ||
"polyfills": "src/polyfills.ts", | ||
"scripts": [], | ||
"styles": [], | ||
"assets": ["src/assets"] | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [], | ||
"exclude": [] | ||
} | ||
} | ||
} | ||
}, | ||
"angular-baidu-maps-e2e": { | ||
"root": "", | ||
"sourceRoot": "", | ||
"projectType": "application", | ||
"architect": { | ||
"e2e": { | ||
"builder": "@angular-devkit/build-angular:protractor", | ||
"options": { | ||
"protractorConfig": "protractor.conf.js", | ||
"devServerTarget": "angular-baidu-maps:serve" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": [], | ||
"exclude": [] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "angular-baidu-maps", | ||
"schematics": { | ||
"@schematics/angular:component": { | ||
"prefix": "", | ||
"styleext": "css" | ||
}, | ||
"@schematics/angular:directive": { | ||
"prefix": "" | ||
} | ||
} | ||
} |
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,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
readonly currentDir=$(cd $(dirname $0); pwd) | ||
cd ${currentDir} | ||
rm -rf publish | ||
rm -rf __gen_lib | ||
rm -rf publish-es2015 | ||
cp -r lib __gen_lib | ||
node ./scripts/inline-template.js | ||
|
||
echo 'Compiling to es2015 via Angular compiler' | ||
$(npm bin)/ngc -p tsconfig-build.json -t es2015 --outDir publish-es2015/src | ||
|
||
echo 'Bundling to es module of es2015' | ||
export ROLLUP_TARGET=esm | ||
$(npm bin)/rollup -c rollup.config.js -f es -i publish-es2015/src/index.js -o publish-es2015/esm2015/abm.js | ||
|
||
echo 'Compiling to es5 via Angular compiler' | ||
$(npm bin)/ngc -p tsconfig-build.json -t es5 --outDir publish-es5/src | ||
|
||
echo 'Bundling to es module of es5' | ||
export ROLLUP_TARGET=esm | ||
$(npm bin)/rollup -c rollup.config.js -f es -i publish-es5/src/index.js -o publish-es5/esm5/abm.js | ||
|
||
echo 'Bundling to umd module of es5' | ||
export ROLLUP_TARGET=umd | ||
$(npm bin)/rollup -c rollup.config.js -f umd -i publish-es5/esm5/abm.js -o publish-es5/bundles/abm.umd.js | ||
|
||
echo 'Bundling to minified umd module of es5' | ||
export ROLLUP_TARGET=mumd | ||
$(npm bin)/rollup -c rollup.config.js -f umd -i publish-es5/esm5/abm.js -o publish-es5/bundles/abm.umd.min.js | ||
|
||
echo 'Unifying publish folder' | ||
mv publish-es5 publish | ||
mv publish-es2015/esm2015 publish/esm2015 | ||
rm -rf publish-es2015 | ||
|
||
echo 'Cleaning up temporary files' | ||
rm -rf __gen_lib | ||
rm -rf publish/src/*.js | ||
rm -rf publish/src/**/*.js | ||
|
||
echo 'Normalizing entry files' | ||
sed -e "s/from '.\//from '.\/src\//g" publish/src/index.d.ts > publish/abm.d.ts | ||
sed -e "s/\":\".\//\":\".\/src\//g" publish/src/index.metadata.json > publish/abm.metadata.json | ||
rm publish/src/index.d.ts publish/src/index.metadata.json | ||
|
||
echo 'Copying package.json' | ||
cp package.json publish/package.json |
Oops, something went wrong.