Skip to content

Commit

Permalink
fixed output do not work - #145
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcaufy committed May 18, 2017
1 parent 443c21d commit 5488ff1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/wepy-cli/src/compile-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ import loader from './loader';


const currentPath = util.currentDir;
const src = cache.getSrc();
const dist = cache.getDist();
const modulesPath = path.join(currentPath, 'node_modules' + path.sep);
const npmPath = path.join(currentPath, dist, 'npm' + path.sep);

let appPath;
let appPath, npmPath, src, dist;

export default {

Expand Down Expand Up @@ -154,6 +151,10 @@ export default {
compile (lang, code, type, opath) {
let config = util.getConfig();

src = cache.getSrc();
dist = cache.getDist();
npmPath = path.join(currentPath, dist, 'npm' + path.sep);

if (!code) {
code = util.readFile(path.join(opath.dir, opath.base));
if (code === null) {
Expand Down

0 comments on commit 5488ff1

Please sign in to comment.