munshkr / ejs-brunch Goto Github PK
View Code? Open in Web Editor NEWAdds EJS template compilation support to Brunch
Adds EJS template compilation support to Brunch
Now it only accepts paths relative to one those from the watched
list from Brunch.
19:58:41 - error: Optimizing of public/app.js failed. L10776:21 SyntaxError: Unexpected token: operator (>)
Everything works normally, just build fails when compiling to production.
I am using coffescript +ejs + jquery. Also, using uglify to minimize for production.
here is my config:
{
"dependencies": {
"ejs-brunch": "^1.0.2",
"jquery": "^3.3.1"
},
"devDependencies": {
"auto-reload-brunch": "^2.7.1",
"brunch": "^2",
"clean-css-brunch": "^2.10.0",
"coffee-script-brunch": "^2.10.2",
"stylus-brunch": "^2.10.0",
"uglify-js-brunch": "^2.10.0"
}
}
This is the result of some console.logs I put in trying to figure out why this plugin is failing.
ejs-brunch
=======================
ejs compile { data: '<p>Hello</p>',
path: 'web/static/templates/template.ejs',
map: undefined }
=======================
=======================
ejs basePath web/static/templates/template.html.ejs
[ 'web/static/templates/template.html.ejs' ]
[TypeError: Path must be a string. Received undefined]
It turns out baseDir is coming up undefined for some reason. Handlebars-brunch works fine so I don't know why it's not finding the directory...
var baseDir = this.config.watched.find(d => parts.indexOf(d) > -1);
console.log("baseDir:", baseDir); // "undefined"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.