[
https://issues.apache.org/jira/browse/SLING-4462?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sandro Boehme resolved SLING-4462.
----------------------------------
Resolution: Fixed
Grunt is now configured with the used npm packages.
Now the following things work:
o A small Karma Jasmine test (src/test/javascript/spec/resource_editor_spec.js)
via './grunt desktop_build' within the 'frontend' folder.
o A small end to end Webdriver test (src/test/javascript/e2e/spec/e2e_spec.js)
via './grunt desktop_build' within the 'frontend' folder.
o `./grunt watch:less` in the frontend folder. The unsupported
org.lesscss.lesscss-maven-plugin is removed now.
o The lesscss source map is generated.
o Bootstraps Less sources and many frontend libraries are removed from SVN.
o The 'frontend/licenselist' skript now lists the frontend 3rd party libs and
its licenses.
> Resource Editor :: Integrate Node.js, Grunt and npm for frontend libraries
> --------------------------------------------------------------------------
>
> Key: SLING-4462
> URL: https://issues.apache.org/jira/browse/SLING-4462
> Project: Sling
> Issue Type: Improvement
> Components: Extensions
> Affects Versions: Resource Editor 1.0.2
> Reporter: Sandro Boehme
> Assignee: Sandro Boehme
>
> The goal is to configure the Resource Editor for frontend tests (Jasmine,
> Karma, end to end via Webdriver) and to optimize its frontend build
> configuration. To accomplish that the Frontend Maven Plugin
> (https://github.com/eirslett/frontend-maven-plugin) is used. It installs
> Node.js, Grunt and npm locally within in the project and makes it available
> in a Maven build.
> Con:
> o The npm repository that needs to be ignored for SVN is generated within the
> project folder.
> o The build takes longer initially as the npm repository needs to be filled
> with the dependencies (<5min on my box).
> o a ~/.npm folder is created and filled with repository data
> Pro:
> o Avoids that I have to check in the frontend libraries and Bootstrap Less
> sources to SVN as they can be copied from the local npm repo during the build
> process.
> o Eases the listing of the 3rd party licenses of used npm package as the npm
> package 'nlf' for example can be used to list the licenses in a specific
> depth of transitive dependencies. It allows a good fix for SLING-4205.
> o I get a map file created by the less compiler
> o Better supported libraries:
> - BDD Unit Tests with different browsers
> Via Maven:
> https://github.com/karma-runner/maven-karma-plugin (31 Stars)
> Via npm:
> https://github.com/karma-runner/karma (4760 Stars)
> - Less CSS compiler and watch functionality
> Via Maven:
> https://github.com/marceloverdijk/lesscss-maven-plugin (155 Stars, not
> supported anymore)
> https://github.com/marceloverdijk/lesscss-java (151 Stars, not supported
> anymore)
> Via npm:
> https://github.com/gruntjs/grunt-contrib-watch (1380 Stars)
> https://github.com/gruntjs/grunt-contrib-less (519 Stars)
> - Minification:
> Via Maven:
> https://github.com/davidB/yuicompressor-maven-plugin (80 Stars)
> Via npm:
> https://github.com/gruntjs/grunt-contrib-uglify (850 Stars)
> https://github.com/gruntjs/grunt-contrib-cssmin (513 Stars)
> - BDD (Jasmine) End to End Tests are not available via Maven
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)