Skip to content

Commit

Permalink
update to ng-12
Browse files Browse the repository at this point in the history
* install peer deps from tailwind again
* fix id deprecation in schema
  • Loading branch information
marcjulian committed May 15, 2021
1 parent eb117c2 commit 92c096c
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 83 deletions.
165 changes: 93 additions & 72 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
"save": "devDependencies"
},
"dependencies": {
"@angular-devkit/core": "^11.0.0",
"@angular-devkit/schematics": "^11.0.0",
"@angular/cdk": "~11.0.0",
"@schematics/angular": "^11.0.0"
"@angular-devkit/core": "^12.0.0",
"@angular-devkit/schematics": "^12.0.0",
"@angular/cdk": "~12.0.0",
"@schematics/angular": "^12.0.0"
},
"devDependencies": {
"@types/jasmine": "^3.3.9",
"@types/jasmine": "^3.7.4",
"@types/node": "^12.11.1",
"jasmine": "^3.6.3",
"jasmine": "^3.7.0",
"prettier": "~2.2.1",
"typescript": "~4.1.3"
"typescript": "~4.1.5"
}
}
12 changes: 12 additions & 0 deletions src/ng-add/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ function addDependenciesWithTailwindSupport(_options: Schema): Rule {
version: _options.tailwindVersion,
});

addPackageJsonDependency(host, {
type: NodeDependencyType.Dev,
name: 'autoprefixer',
version: _options.autoprefixerVersion,
});

addPackageJsonDependency(host, {
type: NodeDependencyType.Dev,
name: 'postcss',
version: _options.postcssVersion,
});

if (!_options.disableCrossPlatform) {
addPackageJsonDependency(host, {
type: NodeDependencyType.Dev,
Expand Down
8 changes: 4 additions & 4 deletions src/ng-add/schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"$schema": "http://json-schema.org/schema",
"id": "NGX_ADD_TAILWIND",
"$id": "NGX_ADD_TAILWIND",
"title": "Angular Tailwind CSS Schematics",
"type": "object",
"description": "Add Tailwind CSS to an Angular project",
"properties": {
"autoprefixerVersion": {
"type": "string",
"description": "The autoprefixer version to be installed.",
"default": "^10.2.4"
"default": "^10.2.5"
},
"angularCliWithTailwindSupport": {
"description": "Angular CLI Version above 11.2 with Tailwind CSS support.",
Expand Down Expand Up @@ -60,7 +60,7 @@
"postcssVersion": {
"type": "string",
"description": "The postcss version to be installed.",
"default": "^8.2.6"
"default": "^8.2.15"
},
"postcssImportVersion": {
"type": "string",
Expand Down Expand Up @@ -95,7 +95,7 @@
"tailwindVersion": {
"type": "string",
"description": "The Tailwind version to be installed.",
"default": "^2.0.3"
"default": "^2.1.2"
}
}
}

0 comments on commit 92c096c

Please sign in to comment.