New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-durandal

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-durandal - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "grunt-durandal",
"description": "Grunt Durandal Builder - Build durandal project using a custom require config and a custom almond",
"version": "0.1.1",
"version": "0.1.2",
"homepage": "https://github.com/spatools/grunt-durandal.git",

@@ -6,0 +6,0 @@ "author": {

@@ -1,3 +0,2 @@

grunt-durandal
==============
# grunt-durandal [![NPM version](https://badge.fury.io/js/grunt-durandal.png)](http://badge.fury.io/js/grunt-durandal)

@@ -68,4 +67,5 @@ Grunt task to build Durandal projects using a custom require config with a custom almond

* 0.1.1 Fix issue with path separator on Windows
* 0.1.2 Fix naming path issue by renaming path for forced includes
[grunt]: https://github.com/gruntjs/grunt
[doc-options]: https://github.com/spatools/grunt-durandal/wiki/Task-Options

@@ -83,10 +83,19 @@ /*

function includePath(array, baseUrl, outputPath, url) {
if (url.indexOf(outputPath) !== -1 || url.indexOf("durandal/amd") !== -1)
function includePath(array, config, url) {
if (url.indexOf(config.out) !== -1 || url.indexOf("durandal/amd") !== -1)
return;
var ext = path.extname(url);
url = path.relative(baseUrl, url);
url = path.relative(config.baseUrl, url);
url = url.replace(/\\/g, "/");
var pathToReplace = _.chain(config.paths)
.map(function (_path, key) { return { key: key, path: _path }; })
.filter(function (_path) { return url.indexOf(_path.path) !== -1; })
.max(function (_path) { return _path.path.length; })
.value();
if (pathToReplace)
url = url.replace(pathToReplace.path, pathToReplace.key);
if (ext === ".html") {

@@ -108,2 +117,3 @@ url = "text!" + url;

var done = this.async(),
config,
params = this.options({

@@ -119,9 +129,9 @@ baseUrl: "app/",

ensureRequireConfig(params);
config = _.extend({}, defaultRequireConfig, params);
this.files.forEach(function (file) {
file.src.forEach(_.partial(includePath, params.include, params.baseUrl, params.out));
file.src.forEach(_.partial(includePath, config.include, config));
});
ensureRequireConfig(params);
var config = _.extend({}, defaultRequireConfig, params);
requirejs.optimize(

@@ -128,0 +138,0 @@ config,

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc