
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
elixir-pep
Advanced tools
All around tool for compiling modules from elixir and a config file that will refresh the stream.
All around tool for compiling modules from elixir and a config file that when changed will automatically refresh the stream.
Currently supported compilers:
npm install --save-dev gulp-util elixir-pep
Require the package in your gulpfile.js and add the pep function to the mix object of elixir. (Remember you can still use elixir's own functions with this command.)
Example gulpfile:
var util = require('gulp-util');
var machine = require('elixir-pep');
machine.start(__dirname + '/' + (util.env.config || 'config'), function(mix) {
// Normal elixir functions
});
Reserved namespaces are: console.
There a couple of built-in tools to improve work speed.
As you can see in the previous example the pep function requires only ONE argument and this is the config in the form of an object.
Example configuration:
{
"modules": [{
"namespace": "demo",
"angular": {
"deps": ["LocalStorageModule"]
},
"libs": {
"src": ["resources/assets/bower/angular/angular.js"]
},
"sass": true
}, {
"namespace": "LocalStorageModule",
"angular": {
"name": "LocalStorageModule",
"src": "resources/assets/bower/angular-local-storage/dist/angular-local-storage.js"
}
}]
}
I have defined two modules here, as you can probably see a lot of stuff is predefined, but also very extensible! You can edit all the different configurations of all different modules by calling the plugins parameter in the config file, like so:
"plugins": {
"angular-templatecache": {
"root": "templates/"
}
}
If you only want this for a module, you can put it into the config object of that module, this will cascade down in the configuration and overwrite the properties that you define here. You can also just create the folders itsself and define a module and its namespace and the module will think of the rest itself.
To run seperate tasks you can execute gulp {module}@{namespace}
, so for example you can run: gulp demo@angular
and this will run only the angular task of the demo module.
The recommended structure for this module is something like:
resources/assets/modules/{namespace}/sass
resources/assets/modules/{namespace}/angular
resources/assets/modules/{namespace}/templates
resources/assets/modules/{namespace}/libs
You can edit this structure entirely in the structure config (scroll down for a view of the entire config file).
To append dependencies to your angular apps, you can add the deps parameter to your module's angular config. This will go through your modules and find the coherent namespaces, it will append the found files to a deps file in the angular dist folder.
To create a module you could go through the following steps:
{
"modules": [{
"namespace": "demo"
}]
}
src
key.{
"modules": [],
"structure": {
"source": {
"basePath": "./resources/assets/modules",
"sass": "sass",
"angular": "angular",
"templates": "templates",
"libs": "libs"
},
"dest": {
"basePath": "./public/dist",
"sass": "css",
"angular": "angular",
"libs": "libs"
}
},
"sass": {
"sourcemaps": true,
"minify": false
},
"js": {
"bundle": false,
"traceur": true,
"sourcemaps": true,
"uglify": false,
"annotate": false,
"filesize": false
},
"plugins": {
"angular-templatecache": {
"root": "",
"module": "templates",
"standalone": false,
"moduleSystem": "",
"templateHeader": "angular.module(\"<%= module %>\"<%= standalone %>).run([\"$templateCache\", function($templateCache) {",
"templateFooter": "}]);"
},
"uglify": {
"mangle": true,
"output": {
"indent_start": 0,
"indent_level": 4,
"quote_keys": false,
"space_colon": true,
"ascii_only": false,
"inline_script": false,
"width": 80,
"max_line_len": 32000,
"ie_proof": true,
"beautify": false,
"source_map": null,
"bracketize": false,
"comments": false,
"semicolons": true
},
"compress": {
"sequences": true,
"properties": true,
"dead_code": true,
"drop_debugger": true,
"unsafe": false,
"conditionals": true,
"comparisons": true,
"evaluate": true,
"booleans": true,
"loops": true,
"unused": true,
"hoist_funs": true,
"hoist_vars": false,
"if_return": true,
"join_vars": true,
"cascade": true,
"side_effects": true,
"warnings": true,
"global_defs": {}
}
},
"traceur": {
"modules": "commonjs"
},
"ng-annotate": {
"remove": true,
"add": true,
"single_quotes": true
},
"autoprefixer": {
"browsers": [
"> 1%",
"last 2 versions",
"Firefox ESR",
"Opera 12.1"
],
"cascade": true,
"remove": true
},
"minify-css": {
"advanced": false,
"aggressiveMerging": false,
"benchmark": false,
"compatibility": false,
"debug": true,
"inliner": false,
"keepBreaks": false,
"keepSpecialComments": "*",
"mediaMerging": true,
"processImport": false,
"rebase": false,
"relativeTo": false,
"restructuring": false,
"root": false,
"roundingPrecision": 2,
"shorthandCompacting": false,
"sourceMap": false,
"sourceMapInlineSources": false,
"target": false
}
}
}
FAQs
All around tool for compiling modules from elixir and a config file that will refresh the stream.
The npm package elixir-pep receives a total of 12 weekly downloads. As such, elixir-pep popularity was classified as not popular.
We found that elixir-pep demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.