File tree Expand file tree Collapse file tree 5 files changed +35
-23
lines changed Expand file tree Collapse file tree 5 files changed +35
-23
lines changed Original file line number Diff line number Diff line change 4
4
5
5
// Dependencies
6
6
@use ' config/tokens' as * ;
7
- // use 'config/{{ pattern }}';
7
+ // @ use 'config/{{ pattern }}';
8
8
9
9
// Declarations
10
10
.{{ prefix }}{{ pattern }} { }
Original file line number Diff line number Diff line change 3
3
- title = '{{ Pattern }}'
4
4
5
5
= content('main')
6
- h2 = title
6
+ section class='bc-white p-4'
7
+ h2 = title
8
+
9
+ == this.include('{{ type }}/{{ pattern }}/{{ pattern }}.md');
10
+
11
+ h3 Demonstration
12
+
13
+ == this.include('{{ type }}/{{ pattern }}/{{ pattern }}.slm');
14
+
15
+ h3 Markup
16
+
17
+ pre class='p-4'
18
+ = this.include('{{ type }}/{{ pattern }}/{{ pattern }}.slm');
7
19
8
20
= content('scripts')
Original file line number Diff line number Diff line change 7
7
* Methods for the main Patterns instance.
8
8
*/
9
9
class Default {
10
+ constructor ( ) {
11
+ if ( process . env . NODE_ENV != 'production' )
12
+ console . dir ( '@pttrn Development Mode' ) ; // eslint-disable-line no-console
13
+ }
14
+
10
15
// Sample method
11
16
// /**
12
17
// * API for the {{ Pattern }} {{ type }}.
Original file line number Diff line number Diff line change @@ -56,6 +56,8 @@ html lang='en'
56
56
script src='https://cdn.jsdelivr.net/gh/CityOfNewYork/
[email protected] /dist/utilities/icons/icons.iffe.js'
57
57
58
58
javascript:
59
+ var MyPatterns = new Default();
60
+
59
61
new Icons('svg/svgs.svg');
60
62
61
63
= content('scripts')
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ import nodeResolve from '@rollup/plugin-node-resolve'; // Locate modules using t
7
7
import replace from '@rollup/plugin-replace' ; // Replace content while bundling.
8
8
9
9
/**
10
- * Rollup Configuration
10
+ * Base module configuration. Refer to the package for details on the available options.
11
+ *
12
+ * @source https://rollupjs.org
11
13
*
12
14
* @type {Object }
13
15
*/
@@ -18,39 +20,30 @@ const rollup = {
18
20
} ;
19
21
20
22
/**
21
- * Plugins Configuration
23
+ * Plugin configuration. Refer to the package for details on the available options.
24
+ *
25
+ * @source https://github.com/rollup/plugins
22
26
*
23
27
* @type {Object }
24
28
*/
25
- let plugins = {
26
- babel : babel . babel ( {
29
+ let plugins = [
30
+ replace ( {
31
+ 'process.env.NODE_ENV' : JSON . stringify ( process . env . NODE_ENV )
32
+ } ) ,
33
+ babel . babel ( {
27
34
exclude : 'node_modules/**' ,
28
35
babelHelpers : 'bundled'
29
36
} ) ,
30
- nodeResolve : nodeResolve . nodeResolve ( {
37
+ nodeResolve . nodeResolve ( {
31
38
browser : true ,
32
39
customResolveOptions : {
33
40
moduleDirectory : 'node_modules'
34
41
}
35
- } ) ,
36
- replace : replace ( {
37
- 'process.env.NODE_ENV' : "'production'"
38
42
} )
39
- } ;
40
-
41
- let dev = [
42
- plugins . babel ,
43
- plugins . nodeResolve
44
- ] ;
45
-
46
- let prod = [
47
- plugins . babel ,
48
- plugins . nodeResolve ,
49
- plugins . replace
50
43
] ;
51
44
52
45
/**
53
- * Rollup Export
46
+ * ES Module Exports
54
47
*
55
48
* @type {Array }
56
49
*/
@@ -66,7 +59,7 @@ export default [
66
59
strict : rollup . strict
67
60
}
68
61
] ,
69
- plugins : ( process . env . NODE_ENV === 'production' ) ? prod : dev ,
62
+ plugins : plugins ,
70
63
devModule : true
71
64
}
72
65
] ;
You can’t perform that action at this time.
0 commit comments