Skip to content

Commit 6384510

Browse files
committed
feat(schematics): adjust project structure to enable build
1 parent 44cb5a4 commit 6384510

18 files changed

+23
-15
lines changed

.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
src/**/files/
1+
schematics/**/files/
22
dist/
File renamed without changes.
File renamed without changes.

package-lock.json

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22
"name": "@angular-extensions/model",
33
"version": "6.0.0",
44
"description": "Angular Model - Simple state management with minimalistic API, one way data flow, multiple model support and immutable data exposed as RxJS Observable.",
5-
"main": "src/model/model.ts",
5+
"main": "lib/model/model.ts",
66
"scripts": {
77
"clean": "rm -rf dist && rm -rf .ng_pkg_build && rm -f dist.tgz",
8-
"lint": "tslint src/**/*.ts -e src/**/files/**",
8+
"lint": "tslint {lib,schematics}/**/*.ts -e schematics/**/files/**",
99
"test": "npm run lint && npm run format:test && npm run lib:test && npm run schm:test",
1010
"build": "npm run clean && npm run lib:build && npm run schm:build",
1111
"release": "npm run test && standard-version && git push --follow-tags origin master && npm run build && npm publish ./dist",
1212
"format": "prettier **/*.{ts,json,md} --write",
1313
"format:test": "prettier **/*.{ts,json,md} --list-different",
1414
"lib:build": "ng-packagr -p package.json",
15-
"lib:test": "mocha src/model/model.test.ts --require ts-node/register",
15+
"lib:test": "mocha lib/model/model.test.ts --require ts-node/register",
1616
"lib:watch": "npm run lib:test -- --watch-extensions ts --watch",
17-
"schm:build": "tsc -p src/schematics/tsconfig.json && cpx src/**/{collection,schema}.json dist",
18-
"schm:test": "mocha src/schematics/**/*.test.ts --require ts-node/register",
17+
"schm:build": "tsc -p tsconfig.schematics.json && cpx schematics/**/{collection,schema}.json dist/schematics",
18+
"schm:test": "mocha schematics/**/*.test.ts --require ts-node/register",
1919
"schm:watch": "npm run schm:test -- --watch-extensions ts --watch"
2020
},
2121
"ngPackage": {
2222
"lib": {
23-
"entryFile": "src/model/model.ts",
23+
"entryFile": "lib/model/model.ts",
2424
"comments": "none"
2525
}
2626
},
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/schematics/ng-add/index.test.ts renamed to schematics/ng-add/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
import { Schema as ApplicationOptions } from '@schematics/angular/application/schema';
88
import { Schema as WorkspaceOptions } from '@schematics/angular/workspace/schema';
99

10-
import packageJson from '../../../package.json';
10+
import packageJson from '../../package.json';
1111

1212
import { Schema as NgAddOptions } from './schema';
1313

src/schematics/ng-add/index.ts renamed to schematics/ng-add/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
22
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
33

4-
import packageJson from '../../../package.json';
4+
import packageJson from '../../package.json';
55
import { addPackageToPackageJson } from '../utils';
66

77
import { Schema as NgAddOptions } from './schema';
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
22
"compilerOptions": {
3-
"outDir": "../../dist/schematics",
4-
"baseUrl": "../../",
3+
"rootDir": "",
4+
"outDir": "dist",
55
"lib": ["es2017", "dom"],
66
"declaration": true,
77
"module": "commonjs",
8+
"resolveJsonModule": true,
9+
"esModuleInterop": true,
810
"moduleResolution": "node",
911
"noEmitOnError": true,
1012
"noFallthroughCasesInSwitch": true,
1113
"noImplicitAny": true,
1214
"noImplicitThis": true,
1315
"noUnusedParameters": true,
1416
"noUnusedLocals": true,
15-
"rootDir": "./",
1617
"skipDefaultLibCheck": true,
1718
"skipLibCheck": true,
1819
"sourceMap": false,
1920
"strictNullChecks": true,
20-
"resolveJsonModule": true,
2121
"target": "es6",
2222
"types": ["node", "mocha"]
2323
},
24-
"include": ["**/*"],
25-
"exclude": ["**/*.test.ts", "*/files/**/*"]
24+
"include": ["schematics/**/*"],
25+
"exclude": ["schematics/**/*.test.ts", "schematics/**/files/**/*"]
2626
}

0 commit comments

Comments
 (0)