@penskemediacorp/larva 0.6.1 → 0.6.4-develop.16
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/build/css/larva-important.css +1 -1
- package/build/css/larva.css +1 -1
- package/build/css/larva.inline-important.css +1 -1
- package/build/css/larva.inline.css +1 -1
- package/build/svg/defs/sprite.defs.html +1 -1
- package/package.json +5 -4
- package/scripts/help.js +65 -0
- package/scripts/link-all.js +40 -0
- package/scripts/lint.js +73 -0
- package/scripts/prod.js +122 -0
- package/scripts/start.js +36 -0
- package/scripts/upgrade.js +99 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@penskemediacorp/larva",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4-develop.16+c3d916e6",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "laras126 <laras126@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/Penske-Media-Corp/pmc-larva/tree/master/packages/larva#readme",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"@babel/preset-env": "^7.10.4",
|
|
46
46
|
"@penskemediacorp/backstopjs-config": "^0.6.0",
|
|
47
47
|
"@penskemediacorp/eslint-config": "^0.6.0",
|
|
48
|
-
"@penskemediacorp/larva-css": "^0.6.
|
|
48
|
+
"@penskemediacorp/larva-css": "^0.6.3",
|
|
49
49
|
"@penskemediacorp/larva-js": "^0.6.0",
|
|
50
|
-
"@penskemediacorp/larva-patterns": "^0.6.
|
|
50
|
+
"@penskemediacorp/larva-patterns": "^0.6.3",
|
|
51
51
|
"@penskemediacorp/larva-scss": "^0.6.0",
|
|
52
52
|
"@penskemediacorp/larva-svg": "^0.6.0",
|
|
53
53
|
"@penskemediacorp/larva-tokens": "^0.6.0",
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"nodemon": "^2.0.4",
|
|
82
82
|
"postcss": "^7.0.35",
|
|
83
83
|
"sass": "^1.32.8",
|
|
84
|
+
"shelljs": "^0.8.5",
|
|
84
85
|
"stylelint": "^13.6.1",
|
|
85
86
|
"svg-sprite": "^1.5.0",
|
|
86
87
|
"svgo": "^1.3.2",
|
|
@@ -88,5 +89,5 @@
|
|
|
88
89
|
"webpack": "^4.43.0",
|
|
89
90
|
"webpack-cli": "^3.3.12"
|
|
90
91
|
},
|
|
91
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "c3d916e6a5bb62c622bb70e29d733c2807f85415"
|
|
92
93
|
}
|
package/scripts/help.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Help command for Larva.
|
|
3
|
+
*
|
|
4
|
+
* ## OPTIONS
|
|
5
|
+
*
|
|
6
|
+
* [<command>]
|
|
7
|
+
* : Slug of a command to display the CLI usage information.
|
|
8
|
+
*
|
|
9
|
+
* ## EXAMPLES
|
|
10
|
+
*
|
|
11
|
+
* # Display a list of available commands.
|
|
12
|
+
* $ npx @penskemediacorp/larva help
|
|
13
|
+
*
|
|
14
|
+
* # Display the prod command docblock.
|
|
15
|
+
* $ npx @penskemediacorp/larva help prod
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// Dependencies.
|
|
19
|
+
const fs = require('fs');
|
|
20
|
+
const path = require( 'path' );
|
|
21
|
+
const shell = require( 'shelljs' );
|
|
22
|
+
|
|
23
|
+
// CLI arguments.
|
|
24
|
+
const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
|
|
25
|
+
const cliArgs = getArgsFromCli();
|
|
26
|
+
|
|
27
|
+
const allowedCommands = [
|
|
28
|
+
'help',
|
|
29
|
+
'link-all',
|
|
30
|
+
'lint',
|
|
31
|
+
'prod',
|
|
32
|
+
'start',
|
|
33
|
+
'upgrade',
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
// Display a generic help description.
|
|
37
|
+
if ( 2 !== cliArgs.length ) {
|
|
38
|
+
console.log( 'Usage: npx @penskemediacorp/larval <command> [--help]\n' );
|
|
39
|
+
console.log( `Where <command> is one of ${allowedCommands.join( ', ' )}.\n` );
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Check for invalid commands.
|
|
44
|
+
const command = cliArgs[1];
|
|
45
|
+
if ( ! allowedCommands.includes( command ) ) {
|
|
46
|
+
console.log( `Invalid command '${command}'.\n` );
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Display the docblock for a given command.
|
|
51
|
+
const pathToFile = path.resolve( __dirname, `${command}.js` );
|
|
52
|
+
try {
|
|
53
|
+
if ( fs.existsSync( pathToFile ) ) {
|
|
54
|
+
fs.readFile( pathToFile, 'utf8', ( error, data ) => {
|
|
55
|
+
if ( error ) {
|
|
56
|
+
console.error( error );
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const fileParts = data.split( '*/', 1 );
|
|
60
|
+
console.log( fileParts[0] + '*/' );
|
|
61
|
+
} );
|
|
62
|
+
}
|
|
63
|
+
} catch( error ) {
|
|
64
|
+
console.error( error );
|
|
65
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This command can be used from within any Larva project to link the Larva
|
|
3
|
+
* packages (from the monorepo) for local development.
|
|
4
|
+
*
|
|
5
|
+
* @see https://github.com/penske-media-corp/pmc-larva/blob/master/README.md#linking-larva-for-local-development
|
|
6
|
+
*
|
|
7
|
+
* ## OPTIONS
|
|
8
|
+
*
|
|
9
|
+
* [--help]
|
|
10
|
+
* : Display usage and examples for this command.
|
|
11
|
+
*
|
|
12
|
+
* ## EXAMPLES
|
|
13
|
+
*
|
|
14
|
+
* # NPM link local packages to Larva monorepo.
|
|
15
|
+
* $ npx @penskemediacorp/larva link-all
|
|
16
|
+
*
|
|
17
|
+
* # Help command.
|
|
18
|
+
* $ npx @penskemediacorp/larva link-all help
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
const shell = require( 'shelljs' );
|
|
22
|
+
|
|
23
|
+
// CLI arguments.
|
|
24
|
+
const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
|
|
25
|
+
const cliArgs = getArgsFromCli();
|
|
26
|
+
|
|
27
|
+
// Handle help command.
|
|
28
|
+
if ( cliArgs.includes( '--help' ) ) {
|
|
29
|
+
shell.exec( `npx @penskemediacorp/larva help link-all` );
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
shell.exec( 'npm link @penskemediacorp/larva' );
|
|
34
|
+
shell.exec( 'npm link @penskemediacorp/larva-css' );
|
|
35
|
+
shell.exec( 'npm link @penskemediacorp/larva-js' );
|
|
36
|
+
shell.exec( 'npm link @penskemediacorp/larva-patterns' );
|
|
37
|
+
shell.exec( 'npm link @penskemediacorp/larva-scss' );
|
|
38
|
+
shell.exec( 'npm link @penskemediacorp/larva-svg' );
|
|
39
|
+
shell.exec( 'npm link @penskemediacorp/larva-tokens' );
|
|
40
|
+
shell.exec( 'npm link @penskemediacorp/twig-to-php-parser' );
|
package/scripts/lint.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lint JavaScript and CSS files in a Larva project.
|
|
3
|
+
*
|
|
4
|
+
* ## OPTIONS
|
|
5
|
+
*
|
|
6
|
+
* [--help]
|
|
7
|
+
* : Display usage and examples for this command.
|
|
8
|
+
*
|
|
9
|
+
* [--css]
|
|
10
|
+
* : Lint CSS assets.
|
|
11
|
+
*
|
|
12
|
+
* [--js]
|
|
13
|
+
* : Lint JavaScript assets.
|
|
14
|
+
*
|
|
15
|
+
* [--fix]
|
|
16
|
+
* : Try to automatically fix any issues that arise while linting.
|
|
17
|
+
*
|
|
18
|
+
* ## EXAMPLES
|
|
19
|
+
*
|
|
20
|
+
* # Lint CSS and JavaScript assets.
|
|
21
|
+
* $ npx @penskemediacorp/larva lint
|
|
22
|
+
*
|
|
23
|
+
* # Only lint CSS assets.
|
|
24
|
+
* $ npx @penskemediacorp/larva lint --css
|
|
25
|
+
*
|
|
26
|
+
* # Only lint JavaScripot assets.
|
|
27
|
+
* $ npx @penskemediacorp/larva lint --js
|
|
28
|
+
*
|
|
29
|
+
* # Fix CSS and JavaScript assets.
|
|
30
|
+
* $ npx @penskemediacorp/larva lint --fix
|
|
31
|
+
*
|
|
32
|
+
* # Mix and match, fix JavaScript assets.
|
|
33
|
+
* $ npx @penskemediacorp/larva lint --js --fix
|
|
34
|
+
*
|
|
35
|
+
* # Help command.
|
|
36
|
+
* $ npx @penskemediacorp/larva lint --help
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
// Dependencies.
|
|
40
|
+
const path = require( 'path' );
|
|
41
|
+
const shell = require( 'shelljs' );
|
|
42
|
+
|
|
43
|
+
// Construct some paths to point our scripts at.
|
|
44
|
+
const binPath = path.resolve( __dirname, '../bin/larva.js' ); // For sibling scripts.
|
|
45
|
+
const workingDirectory = process.cwd(); // For paths relative to the directory this script was called from.
|
|
46
|
+
|
|
47
|
+
// CLI arguments.
|
|
48
|
+
const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
|
|
49
|
+
const cliArgs = getArgsFromCli();
|
|
50
|
+
|
|
51
|
+
// Handle help command.
|
|
52
|
+
if ( cliArgs.includes( '--help' ) ) {
|
|
53
|
+
shell.exec( `npx @penskemediacorp/larva help lint` );
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Trigger linting when a specific flag is present, or when neither flag is
|
|
58
|
+
// present.
|
|
59
|
+
const lintCSS = cliArgs.includes( '--css' ) || ! cliArgs.includes( '--js' );
|
|
60
|
+
const lintJS = cliArgs.includes( '--js' ) || ! cliArgs.includes( '--css' );
|
|
61
|
+
|
|
62
|
+
// Appends ` fix` to our linting scripts if the flag is present.
|
|
63
|
+
const fix = cliArgs.includes( '--fix' ) ? ' fix' : '';
|
|
64
|
+
|
|
65
|
+
if ( lintCSS ) {
|
|
66
|
+
console.log( 'Linting CSS assets\n\n\n' );
|
|
67
|
+
shell.exec( `${binPath} lint-scss${fix}` );
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if ( lintJS ) {
|
|
71
|
+
console.log( 'Linting JavaScript assets\n\n\n' );
|
|
72
|
+
shell.exec( `${binPath} lint-js ${workingDirectory}${fix}` );
|
|
73
|
+
}
|
package/scripts/prod.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run a production ready build in a Larva project.
|
|
3
|
+
*
|
|
4
|
+
* ## OPTIONS
|
|
5
|
+
*
|
|
6
|
+
* [--help]
|
|
7
|
+
* : Display usage and examples for this command.
|
|
8
|
+
*
|
|
9
|
+
* [--parse]
|
|
10
|
+
* : Run the Twig-to-PHP parser.
|
|
11
|
+
*
|
|
12
|
+
* [--parser]
|
|
13
|
+
* : Alias for --parse.
|
|
14
|
+
*
|
|
15
|
+
* [--json]
|
|
16
|
+
* : Run the write-json script.
|
|
17
|
+
*
|
|
18
|
+
* [--write-json]
|
|
19
|
+
* : Alias for --json.
|
|
20
|
+
*
|
|
21
|
+
* [--css]
|
|
22
|
+
* : Build CSS assets.
|
|
23
|
+
*
|
|
24
|
+
* [--scss]
|
|
25
|
+
* : Alias for --css.
|
|
26
|
+
*
|
|
27
|
+
* [--js]
|
|
28
|
+
* : Build JavaScript assets.
|
|
29
|
+
*
|
|
30
|
+
* [--svg]
|
|
31
|
+
* : Build SVG assets.
|
|
32
|
+
*
|
|
33
|
+
* ## EXAMPLES
|
|
34
|
+
*
|
|
35
|
+
* # Run a full build
|
|
36
|
+
* $ npx @penskemediacorp/larva prod
|
|
37
|
+
*
|
|
38
|
+
* # Only run the write-json script.
|
|
39
|
+
* $ npx @penskemediacorp/larva prod --write-json
|
|
40
|
+
*
|
|
41
|
+
* # Run builds for CSS & JavaScript.
|
|
42
|
+
* $ npx @penskemediacorp/larva prod --css --js
|
|
43
|
+
*
|
|
44
|
+
* # Help command.
|
|
45
|
+
* $ npx @penskemediacorp/larva prod --help
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
// Dependencies.
|
|
49
|
+
const path = require( 'path' );
|
|
50
|
+
const shell = require( 'shelljs' );
|
|
51
|
+
|
|
52
|
+
// Construct some paths to point our scripts at.
|
|
53
|
+
const binPath = path.resolve( __dirname, '../bin/larva.js' ); // For sibling scripts.
|
|
54
|
+
|
|
55
|
+
// CLI arguments.
|
|
56
|
+
const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
|
|
57
|
+
const cliArgs = getArgsFromCli();
|
|
58
|
+
|
|
59
|
+
// Handle help command.
|
|
60
|
+
if ( cliArgs.includes( '--help' ) ) {
|
|
61
|
+
shell.exec( `npx @penskemediacorp/larva help prod` );
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Run the Twig-to-PHP parser.
|
|
66
|
+
if (
|
|
67
|
+
1 === cliArgs.length
|
|
68
|
+
|| cliArgs.includes( '--parser' )
|
|
69
|
+
|| cliArgs.includes( '--parse' )
|
|
70
|
+
) {
|
|
71
|
+
console.log( 'Parsing Twig templates\n\n' );
|
|
72
|
+
shell.exec( `npx @penskemediacorp/twig-to-php-parser` );
|
|
73
|
+
} else {
|
|
74
|
+
console.log( 'Skipping Twig templates\n' );
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Run the write-json script.
|
|
78
|
+
if (
|
|
79
|
+
1 === cliArgs.length
|
|
80
|
+
|| cliArgs.includes( '--json' )
|
|
81
|
+
|| cliArgs.includes( '--write-json' )
|
|
82
|
+
) {
|
|
83
|
+
console.log( 'Building JSON assets\n\n' );
|
|
84
|
+
shell.exec( `${binPath} write-json` );
|
|
85
|
+
} else {
|
|
86
|
+
console.log( 'Skipping write-json\n' );
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Build CSS/SCSS.
|
|
90
|
+
if (
|
|
91
|
+
1 === cliArgs.length
|
|
92
|
+
|| cliArgs.includes( '--css' )
|
|
93
|
+
|| cliArgs.includes( '--scss' )
|
|
94
|
+
) {
|
|
95
|
+
console.log( 'Building CSS assets\n\n' );
|
|
96
|
+
shell.exec( `${binPath} prod-scss` );
|
|
97
|
+
} else {
|
|
98
|
+
console.log( 'Skipping building CSS\n' );
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Build JS.
|
|
102
|
+
if (
|
|
103
|
+
1 === cliArgs.length
|
|
104
|
+
|| cliArgs.includes( '--js' )
|
|
105
|
+
) {
|
|
106
|
+
console.log( 'Building JavaScript assets\n\n' );
|
|
107
|
+
shell.exec( `${binPath} prod-js` );
|
|
108
|
+
} else {
|
|
109
|
+
console.log( 'Skipping building JavaScript\n' );
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Build SVG.
|
|
113
|
+
if (
|
|
114
|
+
1 === cliArgs.length
|
|
115
|
+
|| cliArgs.includes( '--svg' )
|
|
116
|
+
) {
|
|
117
|
+
console.log( 'Building SVG assets\n\n' );
|
|
118
|
+
shell.exec( `${binPath} build-icons` );
|
|
119
|
+
shell.exec( "npx svgo -f src/svg -o build/svg" );
|
|
120
|
+
} else {
|
|
121
|
+
console.log( 'Skipping building the SVGs\n' );
|
|
122
|
+
}
|
package/scripts/start.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Start the Larva server.
|
|
3
|
+
*
|
|
4
|
+
* ## OPTIONS
|
|
5
|
+
*
|
|
6
|
+
* [--help]
|
|
7
|
+
* : Display usage and examples for this command.
|
|
8
|
+
*
|
|
9
|
+
* ## EXAMPLES
|
|
10
|
+
*
|
|
11
|
+
* # Start server.
|
|
12
|
+
* $ npx @penskemediacorp/larva start
|
|
13
|
+
*
|
|
14
|
+
* # Help command.
|
|
15
|
+
* $ npx @penskemediacorp/larva start --help
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// Dependencies.
|
|
19
|
+
const path = require( 'path' );
|
|
20
|
+
const shell = require( 'shelljs' );
|
|
21
|
+
|
|
22
|
+
// CLI arguments.
|
|
23
|
+
const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
|
|
24
|
+
const cliArgs = getArgsFromCli();
|
|
25
|
+
|
|
26
|
+
// Handle help command.
|
|
27
|
+
if ( cliArgs.includes( '--help' ) ) {
|
|
28
|
+
shell.exec( `npx @penskemediacorp/larva help start` );
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Construct some paths to point our scripts at.
|
|
33
|
+
const binPath = path.resolve( __dirname, '../bin/larva.js' ); // For sibling scripts.
|
|
34
|
+
const patternsPath = path.resolve( process.cwd(), './src/patterns' ); // Relative path to the patterns.
|
|
35
|
+
|
|
36
|
+
shell.exec( `${binPath} server --watch ${patternsPath} -e twig,html,js` );
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lint JavaScript and CSS files in a Larva project.
|
|
3
|
+
*
|
|
4
|
+
* ## OPTIONS
|
|
5
|
+
*
|
|
6
|
+
* [--help]
|
|
7
|
+
* : Display usage and examples for this command.
|
|
8
|
+
*
|
|
9
|
+
* [--version]
|
|
10
|
+
* : Optional. Version of Larva to install. Defaults to 'latest'.
|
|
11
|
+
*
|
|
12
|
+
* [--skip-css]
|
|
13
|
+
* : Skip building CSS assets.
|
|
14
|
+
*
|
|
15
|
+
* [--skip-js]
|
|
16
|
+
* : Skip building JavaScript assets.
|
|
17
|
+
*
|
|
18
|
+
* [--skip-build]
|
|
19
|
+
* : Skip building any assets.
|
|
20
|
+
*
|
|
21
|
+
* ## EXAMPLES
|
|
22
|
+
*
|
|
23
|
+
* # Upgrade to latest and kickoff a build.
|
|
24
|
+
* $ npx @penskemediacorp/larva upgrade
|
|
25
|
+
*
|
|
26
|
+
* # Skip building CSS assets.
|
|
27
|
+
* $ npx @penskemediacorp/larva upgrade --skip-css
|
|
28
|
+
*
|
|
29
|
+
* # Skip both CSS and JavaScript assets.
|
|
30
|
+
* $ npx @penskemediacorp/larva upgrade --skip-css --skip-js
|
|
31
|
+
*
|
|
32
|
+
* # Skip the entire build.
|
|
33
|
+
* $ npx @penskemediacorp/larva upgrade --skip-build
|
|
34
|
+
*
|
|
35
|
+
* # Upgrade to a specific version
|
|
36
|
+
* $ npx @penskemediacorp/larva upgrade --version=0.6.0
|
|
37
|
+
*
|
|
38
|
+
* # Help command.
|
|
39
|
+
* $ npx @penskemediacorp/larva upgrade --help
|
|
40
|
+
*/
|
|
41
|
+
// Dependencies.
|
|
42
|
+
const path = require( 'path' );
|
|
43
|
+
const shell = require( 'shelljs' );
|
|
44
|
+
|
|
45
|
+
// Construct some paths to point our scripts at.
|
|
46
|
+
const binPath = path.resolve( __dirname, '../bin/larva.js' ); // For sibling scripts.
|
|
47
|
+
|
|
48
|
+
// CLI arguments.
|
|
49
|
+
const getArgsFromCli = require( '../lib/utils/getArgsFromCli' );
|
|
50
|
+
const cliArgs = getArgsFromCli();
|
|
51
|
+
|
|
52
|
+
// Handle help command.
|
|
53
|
+
if ( cliArgs.includes( '--help' ) ) {
|
|
54
|
+
shell.exec( `npx @penskemediacorp/larva help upgrade` );
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Parse the --version flag. Defaults to 'latest'.
|
|
59
|
+
const getVersionArg = () => {
|
|
60
|
+
|
|
61
|
+
// Loop through our args, looking for `--version=`.
|
|
62
|
+
const versionFlag = cliArgs.find( ( cliArg ) => {
|
|
63
|
+
if ( ! cliArg.includes( '--version=' ) ) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return true;
|
|
67
|
+
} );
|
|
68
|
+
|
|
69
|
+
// Did not find it.
|
|
70
|
+
if ( ! versionFlag ) {
|
|
71
|
+
return 'latest';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Trip the value down to just the version.
|
|
75
|
+
const version = versionFlag.replace( '--version=', '' );
|
|
76
|
+
return version ? version : 'latest';
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// Update Larva version installed.
|
|
80
|
+
console.log( `Installing Larva@${getVersionArg()}\n\n` );
|
|
81
|
+
shell.exec( `npm install @penskemediacorp/larva@${getVersionArg()}` );
|
|
82
|
+
|
|
83
|
+
// Build CSS.
|
|
84
|
+
if (
|
|
85
|
+
! cliArgs.includes( '--skip-css' )
|
|
86
|
+
|| cliArgs.includes( '--skip-build' )
|
|
87
|
+
) {
|
|
88
|
+
console.log( 'Building CSS assets\n\n' );
|
|
89
|
+
shell.exec( `${binPath} prod-scss` );
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Build JavaScript.
|
|
93
|
+
if (
|
|
94
|
+
! cliArgs.includes( '--skip-js' )
|
|
95
|
+
|| cliArgs.includes( '--skip-build' )
|
|
96
|
+
) {
|
|
97
|
+
console.log( 'Building JavaScript assets\n\n' );
|
|
98
|
+
shell.exec( `${binPath} prod-js` );
|
|
99
|
+
}
|