Skip to content

Commit e8aea6e

Browse files
committed
docs
1 parent 8331dae commit e8aea6e

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

examples/transpile-css/index.js

-52
Original file line numberDiff line numberDiff line change
@@ -39,55 +39,3 @@ function styl(builder) {
3939
fn();
4040
});
4141
}
42-
43-
44-
// // use the jade plugin defined below
45-
// builder.use(compileJade);
46-
47-
// builder.build(function(err, res){
48-
// if (err) throw err;
49-
// var js = res.require + res.js;
50-
// js += ';require("user")';
51-
// var ret = vm.runInNewContext(js);
52-
// console.log(ret);
53-
// });
54-
55-
// function compileJade(builder) {
56-
// // add the jade "runtime" script
57-
// // which is required for the individual
58-
// // templates to work. Since we invoke
59-
// // this here on builder it is NOT applied
60-
// // recursively, thus adding the script only once
61-
// var runtime = fs.readFileSync(__dirname + '/runtime.js', 'utf8');
62-
// builder.addFile('scripts', 'jade.runtime.js', runtime);
63-
// // add arbitrary js to auto-invoke require("user/jade.runtime"),
64-
// // this is necessary because Jade expects the "jade" variable
65-
// // to be global, but .addFile() wraps it in a commonjs module
66-
// builder.append('require("user/jade.runtime")');
67-
68-
// // hook into the "before scripts" event
69-
// builder.hook('before scripts', function(pkg, fn){
70-
// // check if we have .templates in component.json
71-
// var tmpls = pkg.config.templates;
72-
// if (!tmpls) return fn();
73-
74-
// // translate templates
75-
// tmpls.forEach(function(file){
76-
// // only .jade files
77-
// var ext = path.extname(file);
78-
// if ('.jade' != ext) return;
79-
80-
// // read the file
81-
// file = pkg.path(file);
82-
// var str = fs.readFileSync(file, 'utf8');
83-
// var fn = jade.compile(str, { client: true, compileDebug: false });
84-
85-
// // add the fabricated script which
86-
// // exports the compiled jade template function
87-
// file = path.basename(file, '.jade') + '.js';
88-
// pkg.addFile('scripts', file, 'module.exports = ' + fn);
89-
// });
90-
91-
// fn();
92-
// });
93-
// }

0 commit comments

Comments
 (0)