Permalink
Browse files

adding build and updating some things

  • Loading branch information...
1 parent 4656491 commit f167f37177187e97f76798c12f59ff4ddc0d4d79 @justinbmeyer justinbmeyer committed Aug 31, 2016
View
@@ -0,0 +1,7 @@
+var can = require("can-util/namespace");
+
+require("./can");
+require("./ecosystem");
+require("./legacy");
+
+module.exports = can;
View
@@ -1,21 +1,61 @@
var stealTools = require("steal-tools");
+var globalJS = require("steal-tools/lib/build/helpers/global").js;
+
+var baseNormalize = globalJS.normalize();
stealTools.export({
system: {
- config: __dirname + "/package.json!npm"
+ config: __dirname + "/package.json!npm",
+ main: "can/all"
},
options: {
- useNormalizedDependencies: false
+ useNormalizedDependencies: false,
+ verbose: true
},
outputs: {
- "+global-js": {
- ignore: false
+ "all": {
+ modules: ["can/all"],
+ format: "global",
+ dest: globalJS.dest(__dirname+"/dist/global/can.all.js"),
+ useNormalizedDependencies: true,
+ normalize: function(depName, depLoad, curName, curLoad, loader){
+ return baseNormalize.call(this, depName, depLoad, curName, curLoad, loader, true);
+ },
+ // ignore jquery
+ ignore: [function(name){
+ if(name.indexOf("jquery") === 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }],
+ exports: {"jquery": "jQuery", "can-util/namespace": "can"},
+ removeDevelopmentCode: false
+ },
+ "core": {
+ modules: ["can/can"],
+ format: "global",
+ dest: globalJS.dest(__dirname+"/dist/global/can.js"),
+ useNormalizedDependencies: true,
+ normalize: function(depName, depLoad, curName, curLoad, loader){
+ return baseNormalize.call(this, depName, depLoad, curName, curLoad, loader, true);
+ },
+ // ignore jquery
+ ignore: [function(name){
+ if(name.indexOf("jquery") === 0) {
+ return true;
+ } else {
+ return false;
+ }
+ }],
+ exports: {"jquery": "jQuery", "can-util/namespace": "can"},
+ removeDevelopmentCode: false
}
}
}).catch(function(e){
-
+
setTimeout(function(){
throw e;
},1);
-
+
});
@@ -1,82 +0,0 @@
-var isNpm = require("steal/ext/npm-utils").moduleName.isNpm;
-
-// Function to remove the npmness from moduleNames
-var denpm = function(moduleName){
- if(isNpm(moduleName)) {
- return moduleName.substr(moduleName.indexOf("#") + 1);
- }
- return moduleName;
-};
-
-var reverseNormalize = function(name, load, baseName, baseLoad){
- name = denpm(name);
-
- if(name === "dist/jquery") {
- return "jquery";
- }
-
- if(load.address.indexOf("node_modules") >= 0 ||
- load.address.indexOf("lib/") >= 0) {
- return name.replace(/@.*/,"");
- }
-
- if(name === "util/library") {
- return "can/util/library";
- }
-
- if(name === "can") {
- return name;
- }
-
- if(name === 'util/can') {
- return 'can/util/can';
- }
-
- var parts = name.split("/");
- if(parts.length > 1) {
- parts.splice(parts.length-2,1);
- }
- return "can/"+parts.join("/");
-
-};
-var path = require("path");
-
-module.exports = function(){
- return {
- "amddev" : {
- format: "amd",
- useNormalizedDependencies: true,
- normalize: reverseNormalize,
- dest: function(moduleName, moduleData, load){
- return path.join(__dirname,"..","dist/amd-dev/"+reverseNormalize(moduleName, load)+".js");
- },
- removeDevelopmentCode: false
- },
- "amd" : {
- format: "amd",
- useNormalizedDependencies: true,
- normalize: reverseNormalize,
- dest: function(moduleName, moduleData, load){
- return path.join(__dirname,"..","dist/amd/"+reverseNormalize(moduleName, load)+".js");
- }
- },
- "dev": {
- removeDevelopmentCode: false
- },
- "min": {
- minify: true
- },
- ignorelibs: {
- ignore: ["jquery","jquery/jquery"].concat([function(moduleName, load){
- if(load.address.indexOf("node_modules") >= 0) {
- return true;
- }
- }, function(moduleName) {
- if(moduleName.indexOf('/system') !== -1 ||
- moduleName.indexOf('/add_bundles') !== -1) {
- return true;
- }
- }])
- }
- };
-};
@@ -1,14 +0,0 @@
-var mods = require('../builder.json').modules;
-var pkg = require("../package.json");
-
-var npmPrefix = pkg.name + "@" + pkg.version + "#";
-
-var modules = [];
-
-for(var moduleName in mods) {
- var mod = mods[moduleName];
- mod.moduleName = moduleName//.replace("can/","");
- modules.push(mod);
-}
-
-module.exports = modules;
Oops, something went wrong.

0 comments on commit f167f37

Please sign in to comment.