commonplace
Advanced tools
Comparing version 0.7.0 to 2.0.0-beta.1
@@ -1,52 +0,4 @@ | ||
var CORE_MODULES = [ | ||
// Core JS modules. | ||
// Will tell Gulp which modules to pull into marketplace-core-modules/. | ||
// Will tell the require.js config which files live in marketplace-core-modules/. | ||
'assert', | ||
'buckets', | ||
'builder', | ||
'cache', | ||
'capabilities', | ||
'defer', | ||
'forms', | ||
'format', | ||
'helpers', | ||
'l10n', | ||
'log', | ||
'login', | ||
'models', | ||
'navigation', | ||
'notification', | ||
'nunjucks', | ||
'nunjucks.compat', | ||
'polyfill', | ||
'requests', | ||
'scroll_state', | ||
'site_config', | ||
'storage', | ||
'urls', | ||
'user', | ||
'utils', | ||
'views', | ||
'z' | ||
]; | ||
var CORE_MODULES_ROOT_JS = [ | ||
// Core modules that traditionally live in the root JS path. | ||
'l10n', | ||
'views' | ||
]; | ||
var CORE_VIEWS = [ | ||
'views/fxa_authorize', | ||
'views/not_found', | ||
'views/tests' | ||
]; | ||
var BASE_PATH = 'src/media/'; | ||
var CORE_SRC_PATH = 'marketplace-core-modules/'; | ||
var CORE_TEMPLATE_PATH = 'commonplace/dist/core-templates/'; | ||
var JS_DEST_PATH = BASE_PATH + 'js/'; | ||
var LIB_DEST_PATH = JS_DEST_PATH + 'lib/'; | ||
var CORE_DEST_PATH = LIB_DEST_PATH + 'marketplace-core-modules/'; | ||
var CSS_DEST_PATH = BASE_PATH + 'css/'; | ||
@@ -61,16 +13,3 @@ | ||
'underscore/underscore.js': LIB_DEST_PATH, | ||
'marketplace-core-modules/tests/**/*.js': CORE_DEST_PATH + 'tests', | ||
'marketplace-core-modules/tests/tests.html': 'src/templates/commonplace/' | ||
}; | ||
CORE_MODULES.forEach(function(module) { | ||
if (CORE_MODULES_ROOT_JS.indexOf(module) !== -1) { | ||
// Modules that go into the root JS path (for some reason). | ||
bowerConfig[CORE_SRC_PATH + module + '.js'] = JS_DEST_PATH; | ||
return; | ||
} | ||
bowerConfig[CORE_SRC_PATH + module + '.js'] = CORE_DEST_PATH; | ||
}); | ||
CORE_VIEWS.forEach(function(view) { | ||
bowerConfig[CORE_SRC_PATH + view + '.js'] = CORE_DEST_PATH + 'views/'; | ||
}); | ||
@@ -81,2 +20,3 @@ // Build require config, to be used in development and AMD optimizers. | ||
paths: { | ||
'core': 'lib/core', | ||
'jquery': 'lib/jquery', | ||
@@ -86,4 +26,2 @@ // 'nunjucks': 'lib/nunjucks-slim', | ||
'underscore': 'lib/underscore', | ||
'views/not_found': 'lib/marketplace-core-modules/views/not_found', | ||
'views/tests': 'lib/marketplace-core-modules/views/tests', | ||
}, | ||
@@ -96,11 +34,2 @@ shim: { | ||
}; | ||
CORE_MODULES.forEach(function(module) { | ||
if (CORE_MODULES_ROOT_JS.indexOf(module) !== -1) { | ||
return; | ||
} | ||
requireConfig.paths[module] = 'lib/marketplace-core-modules/' + module; | ||
}); | ||
CORE_VIEWS.forEach(function(view) { | ||
requireConfig.paths[view] = 'lib/marketplace-core-modules/' + view; | ||
}); | ||
@@ -107,0 +36,0 @@ var BOWER_PATH = process.env.BOWER_PATH || './bower_components/'; |
{ | ||
"name": "commonplace", | ||
"description": "Reusable components for Firefox Marketplace frontend projects.", | ||
"version": "0.7.0", | ||
"version": "2.0.0-beta.1", | ||
"main": "lib/commonplace", | ||
@@ -6,0 +6,0 @@ "preferGlobal": true, |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
43547
23
876
1