This repository has been archived by the owner on May 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
56 changed files
with
1,861 additions
and
789 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
Empty file.
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
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": { | ||
"ngx-umeditor": { | ||
"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": ["src/styles.css"], | ||
"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": "ngx-umeditor:build" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"browserTarget": "ngx-umeditor:build:production" | ||
} | ||
} | ||
}, | ||
"extract-i18n": { | ||
"builder": "@angular-devkit/build-angular:extract-i18n", | ||
"options": { | ||
"browserTarget": "ngx-umeditor: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": ["src/tsconfig.app.json", "src/tsconfig.spec.json"], | ||
"exclude": ["**/node_modules/**"] | ||
} | ||
} | ||
} | ||
}, | ||
"ngx-umeditor-e2e": { | ||
"root": "", | ||
"sourceRoot": "", | ||
"projectType": "application", | ||
"architect": { | ||
"e2e": { | ||
"builder": "@angular-devkit/build-angular:protractor", | ||
"options": { | ||
"protractorConfig": "./protractor.conf.js", | ||
"devServerTarget": "ngx-umeditor:serve" | ||
} | ||
}, | ||
"lint": { | ||
"builder": "@angular-devkit/build-angular:tslint", | ||
"options": { | ||
"tsConfig": ["e2e/tsconfig.e2e.json"], | ||
"exclude": ["**/node_modules/**"] | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"defaultProject": "ngx-umeditor", | ||
"schematics": { | ||
"@schematics/angular:component": { | ||
"prefix": "app", | ||
"styleext": "css" | ||
}, | ||
"@schematics/angular:directive": { | ||
"prefix": "app" | ||
} | ||
} | ||
} |
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,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -u -e -o pipefail | ||
|
||
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/umeditor.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/umeditor.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/umeditor.js -o publish-es5/bundles/umeditor.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/umeditor.js -o publish-es5/bundles/umeditor.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/umeditor.d.ts | ||
sed -e "s/\":\".\//\":\".\/src\//g" publish/src/index.metadata.json > publish/umeditor.metadata.json | ||
rm publish/src/index.d.ts publish/src/index.metadata.json | ||
|
||
echo 'Copying package.json' | ||
cp package.json publish/package.json | ||
echo 'Copying README.md' | ||
cp README.md publish/README.md |
Oops, something went wrong.