@penskemediacorp/larva 1.67.0 → 1.68.0
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/__tests__/lib/utils/clonePatternData.test.js +12 -8
- package/__tests__/lib/utils/getPatternData.test.js +12 -8
- package/bin/larva.js +2 -0
- 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/js/common.js +2 -159
- package/build/js/common.js.LICENSE.txt +28 -0
- package/build/js/larva-ui.js +1 -30
- package/build/js/standalone/video-showcase.js +1 -1
- package/build/tokens/wwd-fn.custom-properties.css +1 -0
- package/build/tokens/wwd-fn.json +67 -0
- package/build/tokens/wwd-fn.map.scss +84 -0
- package/build/tokens/wwd-fn.raw.json +699 -0
- package/lib/generateStatic.js +12 -8
- package/lib/server.js +2 -0
- package/lib/start.js +1 -0
- package/lib/utils/copySyncHelper.js +4 -2
- package/lib/utils/getAllPatternsObj.js +3 -0
- package/lib/utils/getAppConfiguration.js +2 -1
- package/lib/utils/getPatternData.js +9 -8
- package/lib/utils/getPatternRoutes.js +1 -0
- package/lib/utils/getPatternVariants.js +1 -0
- package/lib/utils/getPatternsIndexPath.js +2 -0
- package/lib/utils/getSubDirectoryNames.js +4 -2
- package/lib/writeJson.js +3 -0
- package/package.json +10 -10
- package/scripts/build-html.js +1 -0
- package/scripts/build-icons.js +4 -1
- package/scripts/config/.eslintrc.json +9 -1
- package/scripts/config/gulpfile.js +1 -1
- package/scripts/config/webpack.config.js +1 -0
- package/scripts/help.js +13 -11
- package/scripts/init.js +2 -0
- package/scripts/link-all.js +1 -2
- package/scripts/lint.js +3 -3
- package/scripts/prod.js +11 -13
- package/scripts/start.js +1 -1
- package/scripts/upgrade.js +4 -6
- package/scripts/write-json.js +1 -0
- package/build/html/static/js/main.6657eddb.js.map +0 -1
- package/build/html/static/js/main.941390b6.js.map +0 -1
- package/build/html/static/js/main.94574a71.js.map +0 -1
|
@@ -5,10 +5,12 @@ const { projectPatternsDir, larvaPatternsDir } = getConfig( 'patterns' );
|
|
|
5
5
|
|
|
6
6
|
describe( 'clonePatternData', () => {
|
|
7
7
|
it( 'gets object from project patterns dir first', () => {
|
|
8
|
-
const expected = require(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const expected = require(
|
|
9
|
+
path.join(
|
|
10
|
+
projectPatternsDir,
|
|
11
|
+
'/components/c-tagline/c-tagline.prototype'
|
|
12
|
+
)
|
|
13
|
+
);
|
|
12
14
|
const c_tagline = clonePatternData(
|
|
13
15
|
'components/c-tagline/c-tagline.prototype'
|
|
14
16
|
);
|
|
@@ -17,10 +19,12 @@ describe( 'clonePatternData', () => {
|
|
|
17
19
|
} );
|
|
18
20
|
|
|
19
21
|
it( 'falls back to object from larva patterns dir', () => {
|
|
20
|
-
const expected = require(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const expected = require(
|
|
23
|
+
path.join(
|
|
24
|
+
larvaPatternsDir,
|
|
25
|
+
'/components/c-button/c-button.prototype'
|
|
26
|
+
)
|
|
27
|
+
);
|
|
24
28
|
const c_button = clonePatternData(
|
|
25
29
|
'components/c-button/c-button.prototype'
|
|
26
30
|
);
|
|
@@ -8,15 +8,19 @@ const appConfiguration = require( '../../../lib/utils/getAppConfiguration' )(
|
|
|
8
8
|
'patterns'
|
|
9
9
|
);
|
|
10
10
|
|
|
11
|
-
const expectedSchema = require(
|
|
12
|
-
'/src/patterns/components/c-nav-link/c-nav-link.prototype.js'
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
const expectedSchema = require(
|
|
12
|
+
fixture + '/src/patterns/components/c-nav-link/c-nav-link.prototype.js'
|
|
13
|
+
);
|
|
14
|
+
const expectedVariantSchema = require(
|
|
15
|
+
fixture + '/src/patterns/components/c-nav-link/c-nav-link.featured.js'
|
|
16
|
+
);
|
|
17
|
+
const expectedSchemaFromJson = require(
|
|
18
|
+
fixture + '/src/patterns/objects/o-crap/o-crap.json'
|
|
19
|
+
);
|
|
17
20
|
const expectedPath = fixture + '/src/patterns/objects/o-nav/o-nav.json';
|
|
18
|
-
const expectedOneOffSchema = require(
|
|
19
|
-
'/src/patterns/one-offs/newswire/newswire.prototype.js'
|
|
21
|
+
const expectedOneOffSchema = require(
|
|
22
|
+
fixture + '/src/patterns/one-offs/newswire/newswire.prototype.js'
|
|
23
|
+
);
|
|
20
24
|
|
|
21
25
|
const compStub = {
|
|
22
26
|
name: 'c-nav-link',
|
package/bin/larva.js
CHANGED
|
@@ -15,6 +15,7 @@ const hasScriptFile = fs.existsSync(
|
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
if ( hasScriptFile ) {
|
|
18
|
+
// eslint-disable-next-line no-console
|
|
18
19
|
console.log( `Running ${ chalk.italic( scriptName ) } script\n` );
|
|
19
20
|
spawn.sync(
|
|
20
21
|
'node',
|
|
@@ -22,5 +23,6 @@ if ( hasScriptFile ) {
|
|
|
22
23
|
{ stdio: 'inherit' }
|
|
23
24
|
);
|
|
24
25
|
} else {
|
|
26
|
+
// eslint-disable-next-line no-console
|
|
25
27
|
console.error( chalk.red( `No file found for "${ scriptName }".` ) );
|
|
26
28
|
}
|