Skip to content

Commit c6917d9

Browse files
Foxandxsspetebacondarwin
authored andcommitted
build(aio): update boilerplate to new folder structure
1 parent 25132bf commit c6917d9

File tree

3 files changed

+6369
-6
lines changed

3 files changed

+6369
-6
lines changed

aio/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
"~~update-webdriver": "webdriver-manager update --standalone false --gecko false",
2424
"pre~~deploy": "yarn build",
2525
"~~deploy": "firebase deploy --message \"Commit: $TRAVIS_COMMIT\" --non-interactive --token \"$FIREBASE_TOKEN\"",
26-
"boilerplate:add": "node ./scripts/add-example-boilerplate add",
27-
"boilerplate:remove": "node ./scripts/add-example-boilerplate remove"
26+
"boilerplate:add": "node ./tools/examples/add-example-boilerplate add",
27+
"boilerplate:remove": "node ./tools/examples/add-example-boilerplate remove"
2828
},
2929
"private": true,
3030
"dependencies": {

aio/scripts/add-example-boilerplate.js renamed to aio/tools/examples/add-example-boilerplate.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ const path = require('path');
44
const Q = require("q");
55
const shelljs = require('shelljs');
66

7-
const EXAMPLES_PATH = path.join(__dirname, '/../content/examples');
8-
const BOILERPLATE_PATH = path.join(EXAMPLES_PATH, '_boilerplate');
7+
const EXAMPLES_PATH = path.join(__dirname, '/../../content/examples');
8+
const SHARED_PATH = path.join(__dirname, '/shared');
9+
const BOILERPLATE_PATH = path.join(SHARED_PATH, 'boilerplate');
910
const EXAMPLES_TESTING_PATH = path.join(EXAMPLES_PATH, 'testing');
1011

1112
const files = {
@@ -28,7 +29,7 @@ const files = {
2829

2930
// requires admin access because it adds symlinks
3031
function add() {
31-
const realPath = path.join(EXAMPLES_PATH, '/node_modules');
32+
const realPath = path.join(SHARED_PATH, '/node_modules');
3233
const nodeModulesPaths = getNodeModulesPaths(EXAMPLES_PATH);
3334

3435
// we install the examples modules first
@@ -122,7 +123,7 @@ function getUnitTestingPaths(basePath) {
122123
}
123124

124125
function installNodeModules() {
125-
shelljs.exec('yarn', {cwd: EXAMPLES_PATH});
126+
shelljs.exec('yarn', {cwd: SHARED_PATH});
126127
}
127128

128129
function remove() {

0 commit comments

Comments
 (0)