@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.
Files changed (44) hide show
  1. package/__tests__/lib/utils/clonePatternData.test.js +12 -8
  2. package/__tests__/lib/utils/getPatternData.test.js +12 -8
  3. package/bin/larva.js +2 -0
  4. package/build/css/larva-important.css +1 -1
  5. package/build/css/larva.css +1 -1
  6. package/build/css/larva.inline-important.css +1 -1
  7. package/build/css/larva.inline.css +1 -1
  8. package/build/js/common.js +2 -159
  9. package/build/js/common.js.LICENSE.txt +28 -0
  10. package/build/js/larva-ui.js +1 -30
  11. package/build/js/standalone/video-showcase.js +1 -1
  12. package/build/tokens/wwd-fn.custom-properties.css +1 -0
  13. package/build/tokens/wwd-fn.json +67 -0
  14. package/build/tokens/wwd-fn.map.scss +84 -0
  15. package/build/tokens/wwd-fn.raw.json +699 -0
  16. package/lib/generateStatic.js +12 -8
  17. package/lib/server.js +2 -0
  18. package/lib/start.js +1 -0
  19. package/lib/utils/copySyncHelper.js +4 -2
  20. package/lib/utils/getAllPatternsObj.js +3 -0
  21. package/lib/utils/getAppConfiguration.js +2 -1
  22. package/lib/utils/getPatternData.js +9 -8
  23. package/lib/utils/getPatternRoutes.js +1 -0
  24. package/lib/utils/getPatternVariants.js +1 -0
  25. package/lib/utils/getPatternsIndexPath.js +2 -0
  26. package/lib/utils/getSubDirectoryNames.js +4 -2
  27. package/lib/writeJson.js +3 -0
  28. package/package.json +10 -10
  29. package/scripts/build-html.js +1 -0
  30. package/scripts/build-icons.js +4 -1
  31. package/scripts/config/.eslintrc.json +9 -1
  32. package/scripts/config/gulpfile.js +1 -1
  33. package/scripts/config/webpack.config.js +1 -0
  34. package/scripts/help.js +13 -11
  35. package/scripts/init.js +2 -0
  36. package/scripts/link-all.js +1 -2
  37. package/scripts/lint.js +3 -3
  38. package/scripts/prod.js +11 -13
  39. package/scripts/start.js +1 -1
  40. package/scripts/upgrade.js +4 -6
  41. package/scripts/write-json.js +1 -0
  42. package/build/html/static/js/main.6657eddb.js.map +0 -1
  43. package/build/html/static/js/main.941390b6.js.map +0 -1
  44. 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( path.join(
9
- projectPatternsDir,
10
- '/components/c-tagline/c-tagline.prototype'
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( path.join(
21
- larvaPatternsDir,
22
- '/components/c-button/c-button.prototype'
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( fixture +
12
- '/src/patterns/components/c-nav-link/c-nav-link.prototype.js' );
13
- const expectedVariantSchema = require( fixture +
14
- '/src/patterns/components/c-nav-link/c-nav-link.featured.js' );
15
- const expectedSchemaFromJson = require( fixture +
16
- '/src/patterns/objects/o-crap/o-crap.json' );
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( fixture +
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
  }