diff --git a/CHANGELOG.md b/CHANGELOG.md
index db4f1270..e06decea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,17 +1,14 @@
-## [8.0.7](https://github.com/nstudio/xplat/compare/8.0.5...8.0.7) (2019-09-30)
+## [8.0.7](https://github.com/nstudio/xplat/compare/8.0.5...8.0.7) (2019-09-30)
### Bug Fixes
-* **generators:** remove create-xplat-workspace and updated deps ([0117f53](https://github.com/nstudio/xplat/commit/0117f53))
-
+- **generators:** remove create-xplat-workspace and updated deps ([0117f53](https://github.com/nstudio/xplat/commit/0117f53))
### Features
-* **schematics:** app generator now includes Nx + xplat options ([0650c4f](https://github.com/nstudio/xplat/commit/0650c4f))
-
-
+- **schematics:** app generator now includes Nx + xplat options ([0650c4f](https://github.com/nstudio/xplat/commit/0650c4f))
diff --git a/README.md b/README.md
index c8e836b7..611ef35f 100644
--- a/README.md
+++ b/README.md
@@ -64,10 +64,10 @@
Please see our [guidelines for contributing](https://github.com/nstudio/xplat/blob/master/CONTRIBUTING.md).
-[](https://github.com/NathanWalker) |[](https://github.com/dungahk) |[](https://github.com/m-abs) |[](https://github.com/sr3dna) |[](https://github.com/mbaljeetsingh) |[](https://github.com/dopsonbr) |
-:---: |:---: |:---: |:---: |:---: |:---: |
-[NathanWalker](https://github.com/NathanWalker) |[dungahk](https://github.com/dungahk) |[m-abs](https://github.com/m-abs) |[sr3dna](https://github.com/sr3dna) |[mbaljeetsingh](https://github.com/mbaljeetsingh) |[dopsonbr](https://github.com/dopsonbr) |
+| [](https://github.com/NathanWalker) | [](https://github.com/dungahk) | [](https://github.com/m-abs) | [](https://github.com/sr3dna) | [](https://github.com/mbaljeetsingh) | [](https://github.com/dopsonbr) |
+| :-------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------: |
+| [NathanWalker](https://github.com/NathanWalker) | [dungahk](https://github.com/dungahk) | [m-abs](https://github.com/m-abs) | [sr3dna](https://github.com/sr3dna) | [mbaljeetsingh](https://github.com/mbaljeetsingh) | [dopsonbr](https://github.com/dopsonbr) |
-[](https://github.com/kamilmysliwiec) |[](https://github.com/madmath03) |[](https://github.com/miguelramos) |
-:---: |:---: |:---: |
-[kamilmysliwiec](https://github.com/kamilmysliwiec) |[madmath03](https://github.com/madmath03) |[miguelramos](https://github.com/miguelramos) |
+| [](https://github.com/kamilmysliwiec) | [](https://github.com/madmath03) | [](https://github.com/miguelramos) |
+| :-------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------: |
+| [kamilmysliwiec](https://github.com/kamilmysliwiec) | [madmath03](https://github.com/madmath03) | [miguelramos](https://github.com/miguelramos) |
diff --git a/packages/angular/src/schematics/application/index.ts b/packages/angular/src/schematics/application/index.ts
index 41c56a41..715860ae 100644
--- a/packages/angular/src/schematics/application/index.ts
+++ b/packages/angular/src/schematics/application/index.ts
@@ -202,9 +202,7 @@ function adjustAppFiles(options: Schema, tree: Tree) {
if (options.routing) {
// update home route to reflect with root cmp would have been
tree.overwrite(
- `/apps/${directory}${
- options.name
- }/src/app/features/home/components/home.component.html`,
+ `/apps/${directory}${options.name}/src/app/features/home/components/home.component.html`,
appCmpHtml(options.name)
);
}
diff --git a/packages/angular/src/schematics/component/index.ts b/packages/angular/src/schematics/component/index.ts
index 2a2bc3d0..24e7e6af 100644
--- a/packages/angular/src/schematics/component/index.ts
+++ b/packages/angular/src/schematics/component/index.ts
@@ -77,9 +77,7 @@ export default function(options: XplatComponentHelpers.Schema) {
? adjustBarrelIndex(
'component',
options,
- `libs/features/${componentSettings.featureName}/base/${
- options.subFolder
- }/index.ts`,
+ `libs/features/${componentSettings.featureName}/base/${options.subFolder}/index.ts`,
false,
true
)(tree, context)
diff --git a/packages/angular/src/schematics/elements/index.ts b/packages/angular/src/schematics/elements/index.ts
index ec8d6285..4dd5aca6 100644
--- a/packages/angular/src/schematics/elements/index.ts
+++ b/packages/angular/src/schematics/elements/index.ts
@@ -250,9 +250,7 @@ function updateWorkspaceSupport(
function createCustomElementList(componentSymbols) {
const customElements = ['let component;'];
for (const comp of componentSymbols) {
- customElements.push(`component = createCustomElement(${
- comp.symbol
- }, { injector: this.injector });
+ customElements.push(`component = createCustomElement(${comp.symbol}, { injector: this.injector });
customElements.define('${comp.selector}', component);`);
}
return customElements.join('\n');
@@ -264,9 +262,7 @@ function updateBuilder(tree: Tree, options: ElementsOptions) {
`xplat/web/elements/builder/elements.ts`,
builderElementsContent(options.builderModule)
);
- const moduleFilePath = `xplat/web/elements/${
- options.builderModule
- }.module.ts`;
+ const moduleFilePath = `xplat/web/elements/${options.builderModule}.module.ts`;
if (tree.exists(moduleFilePath)) {
const moduleFile = tree.get(moduleFilePath).content.toString();
const selectorParts = moduleFile.split('.define(');
diff --git a/packages/angular/src/utils/xplat.ts b/packages/angular/src/utils/xplat.ts
index 9ca351f6..510a5522 100644
--- a/packages/angular/src/utils/xplat.ts
+++ b/packages/angular/src/utils/xplat.ts
@@ -63,12 +63,8 @@ export namespace ComponentHelpers {
if (platPrefix === platform || platSuffix === platform) {
const appDir = platform === 'web' ? '/app' : '';
const prefixPath = `apps/${projectName}/src${appDir}`;
- const featurePath = `${prefixPath}/features/${
- componentSettings.featureName
- }`;
- const featureModulePath = `${featurePath}/${
- componentSettings.featureName
- }.module.ts`;
+ const featurePath = `${prefixPath}/features/${componentSettings.featureName}`;
+ const featureModulePath = `${featurePath}/${componentSettings.featureName}.module.ts`;
const barrelIndex = `${featurePath}/components/index.ts`;
// console.log('will adjustProject:', projectName);
chains.push((tree: Tree, context: SchematicContext) => {
@@ -132,9 +128,7 @@ export namespace ComponentHelpers {
return adjustBarrelIndex(
'component',
options,
- `xplat/${xplatFolderName}/features/${
- componentSettings.featureName
- }/components/${options.subFolder}/index.ts`,
+ `xplat/${xplatFolderName}/features/${componentSettings.featureName}/components/${options.subFolder}/index.ts`,
true
)(tree, context);
});
@@ -165,9 +159,7 @@ export namespace ComponentHelpers {
return adjustBarrelIndex(
'component',
options,
- `xplat/${xplatFolderName}/features/${
- componentSettings.featureName
- }/components/index.ts`,
+ `xplat/${xplatFolderName}/features/${componentSettings.featureName}/components/index.ts`,
true,
false,
true
diff --git a/packages/electron-angular/src/schematics/application/index.spec.ts b/packages/electron-angular/src/schematics/application/index.spec.ts
index 247be399..27b5b09c 100644
--- a/packages/electron-angular/src/schematics/application/index.spec.ts
+++ b/packages/electron-angular/src/schematics/application/index.spec.ts
@@ -100,11 +100,7 @@ describe('app', () => {
// console.log(checkFile);
expect(
checkFile.indexOf(
- `npm run prepare.electron.${
- options.name
- } && npm-run-all -p serve.electron.${
- options.name
- }.target serve.electron.${options.name}`
+ `npm run prepare.electron.${options.name} && npm-run-all -p serve.electron.${options.name}.target serve.electron.${options.name}`
)
).toBeGreaterThanOrEqual(0);
});
diff --git a/packages/electron/src/schematics/application/index.spec.ts b/packages/electron/src/schematics/application/index.spec.ts
index 415becf3..33fad501 100644
--- a/packages/electron/src/schematics/application/index.spec.ts
+++ b/packages/electron/src/schematics/application/index.spec.ts
@@ -90,11 +90,7 @@ describe('app', () => {
// console.log(checkFile);
expect(
checkFile.indexOf(
- `npm run prepare.electron.${
- options.name
- } && npm-run-all -p serve.electron.${
- options.name
- }.target serve.electron.${options.name}`
+ `npm run prepare.electron.${options.name} && npm-run-all -p serve.electron.${options.name}.target serve.electron.${options.name}`
)
).toBeGreaterThanOrEqual(0);
});
diff --git a/packages/electron/src/utils/xplat.ts b/packages/electron/src/utils/xplat.ts
index e72f8c7c..9c6b99eb 100644
--- a/packages/electron/src/utils/xplat.ts
+++ b/packages/electron/src/utils/xplat.ts
@@ -102,38 +102,26 @@ export namespace XplatElectrontHelpers {
scripts['postinstall.web'] = 'node tools/web/postinstall';
scripts[
`build.${platformApp}`
- ] = `npm run prepare.${platformApp} && ng build ${
- options.name
- } --prod --base-href ./`;
+ ] = `npm run prepare.${platformApp} && ng build ${options.name} --prod --base-href ./`;
scripts[
`build.${platformApp}.local`
] = `npm run build.${platformApp} && electron dist/apps/${options.name}`;
scripts[
`build.${platformApp}.linux`
- ] = `npm run build.${platformApp} && cd dist/apps/${
- options.name
- } && npx electron-builder build --linux`;
+ ] = `npm run build.${platformApp} && cd dist/apps/${options.name} && npx electron-builder build --linux`;
scripts[
`build.${platformApp}.windows`
- ] = `npm run build.${platformApp} && cd dist/apps/${
- options.name
- } && npx electron-builder build --windows`;
+ ] = `npm run build.${platformApp} && cd dist/apps/${options.name} && npx electron-builder build --windows`;
scripts[
`build.${platformApp}.mac`
- ] = `npm run build.${platformApp} && cd dist/apps/${
- options.name
- } && npx electron-builder build --mac`;
+ ] = `npm run build.${platformApp} && cd dist/apps/${options.name} && npx electron-builder build --mac`;
scripts[
`prepare.${platformApp}`
- ] = `npm run postinstall.electron && tsc -p apps/${
- options.name
- }/tsconfig.json`;
+ ] = `npm run postinstall.electron && tsc -p apps/${options.name}/tsconfig.json`;
scripts[`serve.${platformApp}.target`] = `nx serve ${options.name}`;
scripts[
`serve.${platformApp}`
- ] = `wait-on http-get://localhost:4200/ && electron apps/${
- options.name
- }/src --serve`;
+ ] = `wait-on http-get://localhost:4200/ && electron apps/${options.name}/src --serve`;
scripts[
`start.${platformApp}`
] = `npm run prepare.${platformApp} && npm-run-all -p serve.${platformApp}.target serve.${platformApp}`;
diff --git a/packages/ionic-angular/src/schematics/application/index.ts b/packages/ionic-angular/src/schematics/application/index.ts
index aa965144..b5155205 100644
--- a/packages/ionic-angular/src/schematics/application/index.ts
+++ b/packages/ionic-angular/src/schematics/application/index.ts
@@ -82,26 +82,22 @@ export default function(options: ApplicationOptions) {
] = `npm run clean && npm run clean.${platformApp} && npm run build.${platformApp}`;
scripts[
`prepare.${platformApp}.ios`
- ] = `npm run prepare.${platformApp} && cd apps/${directory}${
- options.name
- } && npm run cap.add.ios`;
+ ] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npm run cap.add.ios`;
scripts[
`prepare.${platformApp}.android`
- ] = `npm run prepare.${platformApp} && cd apps/${directory}${
- options.name
- } && npm run cap.add.android`;
- scripts[`open.${platformApp}.ios`] = `cd apps/${directory}${
- options.name
- } && npm run cap.ios`;
- scripts[`open.${platformApp}.android`] = `cd apps/${directory}${
- options.name
- } && npm run cap.android`;
- scripts[`sync.${platformApp}`] = `cd apps/${directory}${
- options.name
- } && npm run cap.copy`;
- scripts[`clean.${platformApp}`] = `cd apps/${directory}${
- options.name
- } && npx rimraf -- hooks node_modules platforms www plugins ios android package-lock.json && npm i && rimraf -- package-lock.json`;
+ ] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npm run cap.add.android`;
+ scripts[
+ `open.${platformApp}.ios`
+ ] = `cd apps/${directory}${options.name} && npm run cap.ios`;
+ scripts[
+ `open.${platformApp}.android`
+ ] = `cd apps/${directory}${options.name} && npm run cap.android`;
+ scripts[
+ `sync.${platformApp}`
+ ] = `cd apps/${directory}${options.name} && npm run cap.copy`;
+ scripts[
+ `clean.${platformApp}`
+ ] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms www plugins ios android package-lock.json && npm i && rimraf -- package-lock.json`;
return updatePackageScripts(tree, scripts);
},
(tree: Tree, context: SchematicContext) => {
@@ -273,9 +269,7 @@ export default function(options: ApplicationOptions) {
},
configurations: {
production: {
- cordovaBuildTarget: `${
- options.name
- }:ionic-cordova-build:production`,
+ cordovaBuildTarget: `${options.name}:ionic-cordova-build:production`,
devServerTarget: `${options.name}:serve:production`
}
}
diff --git a/packages/ionic-angular/src/utils/versions.ts b/packages/ionic-angular/src/utils/versions.ts
index d5a68200..a5f3348b 100644
--- a/packages/ionic-angular/src/utils/versions.ts
+++ b/packages/ionic-angular/src/utils/versions.ts
@@ -14,4 +14,4 @@ export const reflectMetadataVersion = '^0.1.12';
export const coreJsVersion = '^3.1.4';
export const rxjsVersion = '~6.4.0';
export const zonejsVersion = '~0.9.0';
-export const codelyzerVersion = '~5.1.0';
\ No newline at end of file
+export const codelyzerVersion = '~5.1.0';
diff --git a/packages/ionic/src/schematics/application/index.ts b/packages/ionic/src/schematics/application/index.ts
index d4195ddf..77590f83 100644
--- a/packages/ionic/src/schematics/application/index.ts
+++ b/packages/ionic/src/schematics/application/index.ts
@@ -56,37 +56,33 @@ export default function(options: Schema) {
scripts[
`clean`
] = `npx rimraf -- hooks node_modules package-lock.json && npm i`;
- scripts[`start.${platformApp}`] = `cd apps/${directory}${
- options.name
- } && npm start`;
- scripts[`build.${platformApp}`] = `cd apps/${directory}${
- options.name
- } && npm run build:ionic`;
+ scripts[
+ `start.${platformApp}`
+ ] = `cd apps/${directory}${options.name} && npm start`;
+ scripts[
+ `build.${platformApp}`
+ ] = `cd apps/${directory}${options.name} && npm run build:ionic`;
scripts[
`prepare.${platformApp}`
] = `npm run clean && npm run clean.${platformApp} && npm run build.${platformApp}`;
scripts[
`prepare.${platformApp}.ios`
- ] = `npm run prepare.${platformApp} && cd apps/${directory}${
- options.name
- } && npm run cap.add.ios`;
+ ] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npm run cap.add.ios`;
scripts[
`prepare.${platformApp}.android`
- ] = `npm run prepare.${platformApp} && cd apps/${directory}${
- options.name
- } && npm run cap.add.android`;
- scripts[`open.${platformApp}.ios`] = `cd apps/${directory}${
- options.name
- } && npm run cap.ios`;
- scripts[`open.${platformApp}.android`] = `cd apps/${directory}${
- options.name
- } && npm run cap.android`;
- scripts[`sync.${platformApp}`] = `cd apps/${directory}${
- options.name
- } && npm run cap.copy`;
- scripts[`clean.${platformApp}`] = `cd apps/${directory}${
- options.name
- } && npx rimraf -- hooks node_modules platforms www plugins ios android package-lock.json && npm i && rimraf -- package-lock.json`;
+ ] = `npm run prepare.${platformApp} && cd apps/${directory}${options.name} && npm run cap.add.android`;
+ scripts[
+ `open.${platformApp}.ios`
+ ] = `cd apps/${directory}${options.name} && npm run cap.ios`;
+ scripts[
+ `open.${platformApp}.android`
+ ] = `cd apps/${directory}${options.name} && npm run cap.android`;
+ scripts[
+ `sync.${platformApp}`
+ ] = `cd apps/${directory}${options.name} && npm run cap.copy`;
+ scripts[
+ `clean.${platformApp}`
+ ] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms www plugins ios android package-lock.json && npm i && rimraf -- package-lock.json`;
return updatePackageScripts(tree, scripts);
},
(tree: Tree, context: SchematicContext) => {
diff --git a/packages/nativescript-angular/src/schematics/application/index.ts b/packages/nativescript-angular/src/schematics/application/index.ts
index 12498c74..0826d79f 100644
--- a/packages/nativescript-angular/src/schematics/application/index.ts
+++ b/packages/nativescript-angular/src/schematics/application/index.ts
@@ -89,18 +89,18 @@ export default function(options: Schema) {
scripts[
`clean`
] = `npx rimraf -- hooks node_modules package-lock.json && npm i`;
- scripts[`start.${platformApp}.ios`] = `cd apps/${directory}${
- options.name
- } && tns run ios --emulator`;
- scripts[`start.${platformApp}.android`] = `cd apps/${directory}${
- options.name
- } && tns run android --emulator`;
- scripts[`start.${platformApp}.preview`] = `cd apps/${directory}${
- options.name
- } && tns preview`;
- scripts[`clean.${platformApp}`] = `cd apps/${directory}${
- options.name
- } && npx rimraf -- hooks node_modules platforms package-lock.json && npm i && npx rimraf -- package-lock.json`;
+ scripts[
+ `start.${platformApp}.ios`
+ ] = `cd apps/${directory}${options.name} && tns run ios --emulator`;
+ scripts[
+ `start.${platformApp}.android`
+ ] = `cd apps/${directory}${options.name} && tns run android --emulator`;
+ scripts[
+ `start.${platformApp}.preview`
+ ] = `cd apps/${directory}${options.name} && tns preview`;
+ scripts[
+ `clean.${platformApp}`
+ ] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms package-lock.json && npm i && npx rimraf -- package-lock.json`;
return updatePackageScripts(tree, scripts);
},
(tree: Tree, context: SchematicContext) => {
diff --git a/packages/nativescript/src/schematics/application/index.ts b/packages/nativescript/src/schematics/application/index.ts
index 95ebce90..8e1eb702 100644
--- a/packages/nativescript/src/schematics/application/index.ts
+++ b/packages/nativescript/src/schematics/application/index.ts
@@ -76,18 +76,18 @@ export default function(options: Schema) {
scripts[
`clean`
] = `npx rimraf -- hooks node_modules package-lock.json && npm i`;
- scripts[`start.${platformApp}.ios`] = `cd apps/${directory}${
- options.name
- } && tns run ios --emulator`;
- scripts[`start.${platformApp}.android`] = `cd apps/${directory}${
- options.name
- } && tns run android --emulator`;
- scripts[`start.${platformApp}.preview`] = `cd apps/${directory}${
- options.name
- } && tns preview`;
- scripts[`clean.${platformApp}`] = `cd apps/${directory}${
- options.name
- } && npx rimraf -- hooks node_modules platforms package-lock.json && npm i && npx rimraf -- package-lock.json`;
+ scripts[
+ `start.${platformApp}.ios`
+ ] = `cd apps/${directory}${options.name} && tns run ios --emulator`;
+ scripts[
+ `start.${platformApp}.android`
+ ] = `cd apps/${directory}${options.name} && tns run android --emulator`;
+ scripts[
+ `start.${platformApp}.preview`
+ ] = `cd apps/${directory}${options.name} && tns preview`;
+ scripts[
+ `clean.${platformApp}`
+ ] = `cd apps/${directory}${options.name} && npx rimraf -- hooks node_modules platforms package-lock.json && npm i && npx rimraf -- package-lock.json`;
return updatePackageScripts(tree, scripts);
},
(tree: Tree, context: SchematicContext) => {
diff --git a/scripts/documentation/generate-schematics-data.ts b/scripts/documentation/generate-schematics-data.ts
index eb67cd10..d1228717 100644
--- a/scripts/documentation/generate-schematics-data.ts
+++ b/scripts/documentation/generate-schematics-data.ts
@@ -113,9 +113,7 @@ Promise.all(
)
.then(() => {
console.log(
- `Documentation from ${config.root} generated to ${
- config.schematicOutput
- }`
+ `Documentation from ${config.root} generated to ${config.schematicOutput}`
);
});
})
diff --git a/scripts/xplat-release.js b/scripts/xplat-release.js
index b852ca45..4cec115d 100755
--- a/scripts/xplat-release.js
+++ b/scripts/xplat-release.js
@@ -83,9 +83,7 @@ function parseVersion(version) {
const parsedVersion = parseVersion(parsedArgs._[2]);
if (!parsedVersion.isValid) {
console.error(
- `\nError:\nThe specified version is not valid. You specified: "${
- parsedVersion.version
- }"`
+ `\nError:\nThe specified version is not valid. You specified: "${parsedVersion.version}"`
);
console.error(
`Please run "yarn xplat-release --help" for details on the acceptable version format.\n`
@@ -102,9 +100,7 @@ const cliVersion = devDependencies['@angular/cli'];
const typescriptVersion = devDependencies['typescript'];
console.log('Executing build script:');
-const buildCommand = `./scripts/package.sh ${
- parsedVersion.version
-} ${cliVersion} ${typescriptVersion}`;
+const buildCommand = `./scripts/package.sh ${parsedVersion.version} ${cliVersion} ${typescriptVersion}`;
console.log(`> ${buildCommand}`);
childProcess.execSync(buildCommand, {
stdio: [0, 1, 2]
@@ -201,9 +197,7 @@ releaseIt(options)
* We always use either "latest" or "next" (i.e. no separate tags for alpha, beta etc)
*/
const npmTag = parsedVersion.isPrerelease ? 'next' : 'latest';
- const npmPublishCommand = `./scripts/publish.sh ${
- output.version
- } ${npmTag}`;
+ const npmPublishCommand = `./scripts/publish.sh ${output.version} ${npmTag}`;
console.log('Executing publishing script for all packages:');
console.log(`> ${npmPublishCommand}`);
console.log(