Skip to content

Commit 431700f

Browse files
committed
Add script to bundle lib scss
1 parent e81722a commit 431700f

File tree

11 files changed

+252
-28
lines changed

11 files changed

+252
-28
lines changed

package-lock.json

Lines changed: 231 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@
2323
"build": "ng build",
2424
"build-watch": "ng build --watch",
2525
"build-prod": "ng build --prod --output-hashing=none",
26+
"build-lib": "ng build angular-material-datatransfer && node ./scripts/scss-bundle.build.js",
2627
"package-es5": "cd dist/amd-app && type runtime-es5.js polyfills-es5.js main-es5.js > angular-material-datatransfer-es5.js",
2728
"package-es2015": "cd dist/amd-app && type runtime-es2015.js polyfills-es2015.js main-es2015.js > angular-material-datatransfer-es2015.js",
28-
"append-banner": "node ./prepend.build.js",
29+
"append-banner": "node ./scripts/prepend.build.js",
2930
"bundle": "npm run build-prod amd-app && npm run package-es5 && npm run package-es2015 && npm run append-banner",
3031
"test": "ng test",
3132
"lint": "ng lint",
@@ -71,6 +72,7 @@
7172
"karma-jasmine-html-reporter": "^1.5.1",
7273
"ng-packagr": "^5.1.0",
7374
"protractor": "~5.4.0",
75+
"scss-bundle": "^3.0.2",
7476
"ts-node": "~8.5.4",
7577
"tsickle": "^0.37.1",
7678
"tslint": "~5.20.1",

projects/amd-app/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

projects/amd-app/src/style/app.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
@import 'angular-material-theme.scss';
33

44
.angular-material-datatransfer {
5-
@import 'projects/angular-material-datatransfer/src/style/style.scss';
5+
@import 'projects/angular-material-datatransfer/src/assets/style/main.scss';
66
}
Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1 @@
1-
# AngularMaterialDatatransfer
2-
3-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.0.
4-
5-
## Code scaffolding
6-
7-
Run `ng generate component component-name --project angular-material-datatransfer` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project angular-material-datatransfer`.
8-
> Note: Don't forget to add `--project angular-material-datatransfer` or else it will be added to the default project in your `angular.json` file.
9-
10-
## Build
11-
12-
Run `ng build angular-material-datatransfer` to build the project. The build artifacts will be stored in the `dist/` directory.
13-
14-
## Publishing
15-
16-
After building your library with `ng build angular-material-datatransfer`, go to the dist folder `cd dist/angular-material-datatransfer` and run `npm publish`.
17-
18-
## Running unit tests
19-
20-
Run `ng test angular-material-datatransfer` to execute the unit tests via [Karma](https://karma-runner.github.io).
21-
22-
## Further help
23-
24-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
1+
https://github.com/niklr/angular-material-datatransfer

prepend.build.js renamed to scripts/prepend.build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const fs = require('fs');
2-
const pjson = require('./package.json');
2+
const pjson = require('../package.json');
33

44
var files = [
55
"./dist/amd-app/angular-material.css",

0 commit comments

Comments
 (0)