@nstudio/web 12.7.0 → 13.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
@@ -28,9 +28,9 @@ npx create-nx-workspace@latest
|
|
28
28
|
|
29
29
|
At the prompts:
|
30
30
|
|
31
|
-
>
|
31
|
+
> What to create in the new workspace
|
32
32
|
|
33
|
-
> choose `
|
33
|
+
> choose `apps`
|
34
34
|
|
35
35
|
```
|
36
36
|
npm i @nstudio/xplat -D
|
@@ -187,9 +187,9 @@ nx run nativescript-mobile:android
|
|
187
187
|
|
188
188
|
Please see our [guidelines for contributing](https://github.com/nstudio/xplat/blob/master/CONTRIBUTING.md).
|
189
189
|
|
190
|
-
| [<img alt="NathanWalker" src="https://avatars.githubusercontent.com/u/457187?v=4&s=117" width="117">](https://github.com/NathanWalker) | [<img alt="
|
191
|
-
| :------------------------------------------------------------------------------------------------------------------------------------: |
|
192
|
-
| [NathanWalker](https://github.com/NathanWalker) | [
|
190
|
+
| [<img alt="NathanWalker" src="https://avatars.githubusercontent.com/u/457187?v=4&s=117" width="117">](https://github.com/NathanWalker) | [<img alt="pegaltier" src="https://avatars.githubusercontent.com/u/2479323?v=4&s=117" width="117">](https://github.com/pegaltier) | [<img alt="m-abs" src="https://avatars.githubusercontent.com/u/1348705?v=4&s=117" width="117">](https://github.com/m-abs) | [<img alt="sr3dna" src="https://avatars.githubusercontent.com/u/15936818?v=4&s=117" width="117">](https://github.com/sr3dna) | [<img alt="mbaljeetsingh" src="https://avatars.githubusercontent.com/u/872762?v=4&s=117" width="117">](https://github.com/mbaljeetsingh) |
|
191
|
+
| :------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------: |
|
192
|
+
| [NathanWalker](https://github.com/NathanWalker) | [pegaltier](https://github.com/pegaltier) | [m-abs](https://github.com/m-abs) | [sr3dna](https://github.com/sr3dna) | [mbaljeetsingh](https://github.com/mbaljeetsingh) |
|
193
193
|
|
194
194
|
| [<img alt="dopsonbr" src="https://avatars.githubusercontent.com/u/5340660?v=4&s=117" width="117">](https://github.com/dopsonbr) | [<img alt="AgentEnder" src="https://avatars.githubusercontent.com/u/6933928?v=4&s=117" width="117">](https://github.com/AgentEnder) | [<img alt="davecoffin" src="https://avatars.githubusercontent.com/u/1245462?v=4&s=117" width="117">](https://github.com/davecoffin) | [<img alt="dmitryr117" src="https://avatars.githubusercontent.com/u/5959314?v=4&s=117" width="117">](https://github.com/dmitryr117) | [<img alt="kamilmysliwiec" src="https://avatars.githubusercontent.com/u/23244943?v=4&s=117" width="117">](https://github.com/kamilmysliwiec) | [<img alt="madmath03" src="https://avatars.githubusercontent.com/u/6967675?v=4&s=117" width="117">](https://github.com/madmath03) |
|
195
195
|
| :-----------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------: |
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nstudio/web",
|
3
|
-
"version": "
|
3
|
+
"version": "13.4.1",
|
4
4
|
"description": "Web Plugin for xplat",
|
5
5
|
"homepage": "https://nstudio.io/xplat",
|
6
6
|
"repository": {
|
@@ -30,9 +30,9 @@
|
|
30
30
|
"migrations": "./migrations.json"
|
31
31
|
},
|
32
32
|
"dependencies": {
|
33
|
-
"@nrwl/web": "^
|
33
|
+
"@nrwl/web": "^13.0.0"
|
34
34
|
},
|
35
35
|
"peerDependencies": {
|
36
|
-
"@nstudio/xplat": "
|
36
|
+
"@nstudio/xplat": "13.4.1"
|
37
37
|
}
|
38
38
|
}
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const schematics_1 = require("@angular-devkit/schematics");
|
4
4
|
const xplat_utils_1 = require("@nstudio/xplat-utils");
|
5
5
|
function default_1(options) {
|
6
|
-
return schematics_1.chain([
|
7
|
-
xplat_utils_1.prerun(options, true),
|
6
|
+
return (0, schematics_1.chain)([
|
7
|
+
(0, xplat_utils_1.prerun)(options, true),
|
8
8
|
options.platforms
|
9
|
-
? (tree, context) => schematics_1.externalSchematic('@nstudio/web', 'xplat', options)
|
10
|
-
: schematics_1.noop(),
|
9
|
+
? (tree, context) => (0, schematics_1.externalSchematic)('@nstudio/web', 'xplat', options)
|
10
|
+
: (0, schematics_1.noop)(),
|
11
11
|
]);
|
12
12
|
}
|
13
13
|
exports.default = default_1;
|
@@ -5,24 +5,24 @@ const xplat_1 = require("@nstudio/xplat");
|
|
5
5
|
const xplat_utils_1 = require("@nstudio/xplat-utils");
|
6
6
|
const xplat_2 = require("../../utils/xplat");
|
7
7
|
function default_1(options) {
|
8
|
-
return schematics_1.chain([
|
9
|
-
xplat_utils_1.prerun(options),
|
8
|
+
return (0, schematics_1.chain)([
|
9
|
+
(0, xplat_utils_1.prerun)(options),
|
10
10
|
(tree, context) => {
|
11
11
|
if (tree.exists('/libs/xplat/scss/src/_index.scss')) {
|
12
12
|
// may have already generated support
|
13
|
-
return schematics_1.noop()(tree, context);
|
13
|
+
return (0, schematics_1.noop)()(tree, context);
|
14
14
|
}
|
15
15
|
else {
|
16
|
-
return schematics_1.branchAndMerge(schematics_1.mergeWith(schematics_1.apply(schematics_1.url(`./_files_lib_scss`), [
|
17
|
-
schematics_1.template(Object.assign(Object.assign({}, options), xplat_1.getDefaultTemplateOptions())),
|
18
|
-
schematics_1.move(`libs/xplat/scss/src`),
|
16
|
+
return (0, schematics_1.branchAndMerge)((0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)(`./_files_lib_scss`), [
|
17
|
+
(0, schematics_1.template)(Object.assign(Object.assign({}, options), (0, xplat_1.getDefaultTemplateOptions)())),
|
18
|
+
(0, schematics_1.move)(`libs/xplat/scss/src`),
|
19
19
|
])))(tree, context);
|
20
20
|
}
|
21
21
|
},
|
22
22
|
(tree, context) => {
|
23
23
|
if (tree.exists('/libs/xplat/web/scss/src/_index.scss')) {
|
24
24
|
// may have already generated support
|
25
|
-
return schematics_1.noop()(tree, context);
|
25
|
+
return (0, schematics_1.noop)()(tree, context);
|
26
26
|
}
|
27
27
|
else {
|
28
28
|
return xplat_1.XplatHelpers.addPlatformFiles(options, 'web', 'scss', '_index.scss')(tree, context);
|
@@ -13,7 +13,7 @@ const schematics_1 = require("@angular-devkit/schematics");
|
|
13
13
|
const xplat_utils_1 = require("@nstudio/xplat-utils");
|
14
14
|
const testing_1 = require("@nstudio/xplat/testing");
|
15
15
|
const testing_2 = require("../../utils/testing");
|
16
|
-
xplat_utils_1.setTest();
|
16
|
+
(0, xplat_utils_1.setTest)();
|
17
17
|
describe('xplat schematic', () => {
|
18
18
|
let appTree;
|
19
19
|
const defaultOptions = {
|
@@ -22,15 +22,15 @@ describe('xplat schematic', () => {
|
|
22
22
|
};
|
23
23
|
beforeEach(() => {
|
24
24
|
appTree = schematics_1.Tree.empty();
|
25
|
-
appTree = testing_1.createEmptyWorkspace(appTree);
|
25
|
+
appTree = (0, testing_1.createEmptyWorkspace)(appTree);
|
26
26
|
});
|
27
27
|
it('should create default xplat support for web only', () => __awaiter(void 0, void 0, void 0, function* () {
|
28
28
|
const options = Object.assign({}, defaultOptions);
|
29
|
-
const tree = yield testing_2.runSchematic('xplat', options, appTree);
|
29
|
+
const tree = yield (0, testing_2.runSchematic)('xplat', options, appTree);
|
30
30
|
// console.log(tree.files);
|
31
31
|
expect(tree.exists('/libs/xplat/web/scss/src/_index.scss')).toBeTruthy();
|
32
32
|
const packagePath = '/package.json';
|
33
|
-
const packageFile = xplat_utils_1.jsonParse(testing_1.getFileContent(tree, packagePath));
|
33
|
+
const packageFile = (0, xplat_utils_1.jsonParse)((0, testing_1.getFileContent)(tree, packagePath));
|
34
34
|
const hasScss = packageFile.dependencies[`@testing/xplat-scss`];
|
35
35
|
expect(hasScss).toBeDefined();
|
36
36
|
}));
|
package/src/utils/testing.js
CHANGED
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.callRule = exports.runSchematic = void 0;
|
4
4
|
const path_1 = require("path");
|
5
5
|
const testing_1 = require("@angular-devkit/schematics/testing");
|
6
|
-
const testRunner = new testing_1.SchematicTestRunner('@nstudio/web', path_1.join(__dirname, '../../collection.json'));
|
6
|
+
const testRunner = new testing_1.SchematicTestRunner('@nstudio/web', (0, path_1.join)(__dirname, '../../collection.json'));
|
7
7
|
function runSchematic(schematicName, options, tree) {
|
8
8
|
return testRunner.runSchematicAsync(schematicName, options, tree).toPromise();
|
9
9
|
}
|
package/src/utils/versions.js
CHANGED
package/src/utils/xplat.js
CHANGED
@@ -9,7 +9,7 @@ var XplatWebHelpers;
|
|
9
9
|
// nothing extra needed at moment
|
10
10
|
return (tree, context) => {
|
11
11
|
const dependencies = {};
|
12
|
-
dependencies[`@${xplat_utils_1.getNpmScope()}/xplat-scss`] = 'file:libs/xplat/scss/src';
|
12
|
+
dependencies[`@${(0, xplat_utils_1.getNpmScope)()}/xplat-scss`] = 'file:libs/xplat/scss/src';
|
13
13
|
return xplat_1.XplatHelpers.updatePackageForXplat(options, {
|
14
14
|
dependencies,
|
15
15
|
})(tree, context);
|