File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ MIT License http://www.opensource.org/licenses/mit-license.php
3
+ Author Tobias Koppers @sokra
4
+ */
5
+ var parseSource = require ( "./parseSource" ) ;
6
+ var getPlaceholderIdent = require ( "./getPlaceholderIdent" ) ;
7
+
8
+ module . exports = function ( content ) {
9
+ if ( this . cacheable ) this . cacheable ( ) ;
10
+
11
+ var stuff = parseSource ( content ) ;
12
+
13
+ var placeholders = { } ;
14
+ stuff . placeholders . forEach ( function ( placeholder ) {
15
+ if ( ! placeholders [ placeholder . name ] ) {
16
+ placeholders [ placeholder . name ] = getPlaceholderIdent ( this , placeholder . name ) ;
17
+ }
18
+ } , this ) ;
19
+
20
+ return "module.exports = " + JSON . stringify ( placeholders ) + ";" ;
21
+ } ;
Original file line number Diff line number Diff line change
1
+ /*
2
+ MIT License http://www.opensource.org/licenses/mit-license.php
3
+ Author Tobias Koppers @sokra
4
+ */
5
+ module . exports = require ( "./lib/placeholdersLoader" ) ;
You can’t perform that action at this time.
0 commit comments