File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,17 @@ import parser from './parser';
1313
1414let plugins = [ localByDefault , extractImports , scope ] ;
1515
16- const load = ( sourceString , sourcePath , trace , pathFetcher ) => {
16+ /**
17+ * @param {string } sourceString The file content
18+ * @param {string } sourcePath
19+ * @param {string } trace
20+ * @param {function } pathFetcher
21+ * @return {object }
22+ */
23+ function load ( sourceString , sourcePath , trace , pathFetcher ) {
24+ // @todo To think about a better way to export tokens from the plugin
1725 let exportTokens = { } ;
26+
1827 let result = postcss ( plugins . concat ( new parser ( { exportTokens, pathFetcher, trace } ) ) )
1928 . process ( sourceString , { from : '/' + sourcePath } )
2029 . stringify ( ) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const importRegexp = /^:import\((.+)\)$/
77export default plugin ( 'parser' , function ( opts ) {
88 opts = opts || { } ;
99
10+ // have to export it outside of the plugin :()
1011 let exportTokens = opts . exportTokens ;
1112 let translations = { } ;
1213
You can’t perform that action at this time.
0 commit comments