Blame view

build/vue.config.js 362 Bytes
7fa943eb   梁灏   init
1
2
3
4
5
6
7
8
9
10
11
12
  var compiler = require('vueify').compiler;
  var fs = require('fs');
  
  var data = fs.readFileSync('../components/button/button.vue', 'utf-8');
  // console.log(data);
  
  var fileContent = data;
  var filePath = '../components/button';
  compiler.compile(fileContent, filePath, function (err, result) {
      // result is a common js module string
      console.log(result);
  });