wmluke / grunt-inline-angular-templates Goto Github PK
View Code? Open in Web Editor NEWInline angular templates into a HTML file
License: MIT License
Inline angular templates into a HTML file
License: MIT License
Hi
Mostly for information / help to other:
Due to recent update with cheerio, inline_angular_template fails with the following error:
Running "inline_angular_templates:dist" (inline_angular_templates) task
Warning: select is not a function� Use --force to continue.Aborted due to warnings.
The issue is linked with cherrio 0.12.4: It requests a cheerio-select v* ==> This load latest (and incompatible) version.
(It triggers even with shrinkwrapped build on our systems)
Couple of solutions:
a. In "angularjs" project, enfore cheerio-select via
npm install --save-dev [email protected]
(You may need to delete it from your node module to force redownload)
b. Update package.json of grunt-inline-angular-tempates to use 0.0.3 dep of cheerio-select
c. Update package.json of cheerio to fix cheerio-select (cheeriojs/cheerio#1654)
Hope this helps others
Cheerio will change things like "data-ng-app" to "data-ngApp", breaking the Angular app in the process.
Workaround is to just use "ng-app" but ideally there would be an option to pass to cheerio/htmlparser/whatever such that it doesn't mess with the attribute names when load()
+ html()
are called.
Hopefully there's an option to do that, but if it exists, I haven't found it yet.
I did write a test for this, though, over in this branch: https://github.com/Trott/grunt-inline-angular-templates/tree/no-munging-attribute-names
Cheerio is listed as devDependency. It should be a dependency.
Hi,
recently I updated my package.json and your module has maybe a problem.
"string is not a function". It is an error with cheerio version I think.
To help you, I just use the 0.1.2 and add cheerio 0.18.0 in my package.json and all works.
If you run npm install grunt-inline-angular-templates
, you will get a version that still has cheerio in the devDependencies rather than the dependencies.
You can confirm this also by doing npm info grunt-inline-angular-templates
, seeing that the tarball is located at http://registry.npmjs.org/grunt-inline-angular-templates/-/grunt-inline-angular-templates-0.1.2.tgz, downloading that tarball, expanding it, and looking at the package.json
.
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.