Skip to content

Commit

Permalink
Merge pull request #138 from blikblum/es-module
Browse files Browse the repository at this point in the history
Add ES module build
  • Loading branch information
young-steveo committed Jan 15, 2020
2 parents f302d86 + 1f8a42a commit 0895360
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 21 deletions.
56 changes: 35 additions & 21 deletions grunt/config/grunt-contrib-concat.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
{
"concat" : {
"dist" : {
"options" : {
"stripBanners" : false,
"separator" : "\n",
"banner" : "/**\n * BottleJS v<%= pkg.version %> - <%= grunt.template.today('yyyy-mm-dd') %>\n * <%= pkg.description %>\n *\n * Copyright (c) <%= grunt.template.today('yyyy') %> Stephen Young\n * Licensed <%= pkg.license %>\n */\n"
"concat": {
"dist": {
"options": {
"stripBanners": false,
"separator": "\n",
"banner": "/**\n * BottleJS v<%= pkg.version %> - <%= grunt.template.today('yyyy-mm-dd') %>\n * <%= pkg.description %>\n *\n * Copyright (c) <%= grunt.template.today('yyyy') %> Stephen Young\n * Licensed <%= pkg.license %>\n */\n"
},
"src" : [
"src/globals.js",
"src/Bottle/middleware.js",
"src/Bottle/provider.js",
"src/Bottle/factory.js",
"src/Bottle/service.js",
"src/Bottle/service-factory.js",
"src/Bottle/value.js",
"src/Bottle/constant.js",
"src/Bottle/**.js",
"src/api.js",
"src/export.js"
],
"dest" : "dist/bottle.js"
"files": {
"dist/bottle.js": [
"src/globals.js",
"src/Bottle/middleware.js",
"src/Bottle/provider.js",
"src/Bottle/factory.js",
"src/Bottle/service.js",
"src/Bottle/service-factory.js",
"src/Bottle/value.js",
"src/Bottle/constant.js",
"src/Bottle/**.js",
"src/api.js",
"src/export.js"
],
"dist/bottle-es.js": [
"src/globals.js",
"src/Bottle/middleware.js",
"src/Bottle/provider.js",
"src/Bottle/factory.js",
"src/Bottle/service.js",
"src/Bottle/service-factory.js",
"src/Bottle/value.js",
"src/Bottle/constant.js",
"src/Bottle/**.js",
"src/api.js",
"src/export-es.js"
]
}
}
}
}
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "1.7.2",
"description": "A powerful dependency injection micro container",
"main": "dist/bottle.js",
"module": "dist/bottle-es.js",
"typings": "dist/bottle.d.ts",
"scripts": {
"test": "grunt test"
Expand Down
1 change: 1 addition & 0 deletions src/export-es.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default Bottle

0 comments on commit 0895360

Please sign in to comment.