diff --git a/.gitignore b/.gitignore index 07b605d..056bdb4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ node_modules # ------------ # All projects /lib +/production/lib # Project-specific /public/assets diff --git a/package.json b/package.json index e5890fd..59dbb3c 100755 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "startProd": "node lib/mady --dir src/locales", "compile": "yarn compile:clean && yarn compile:copy && yarn compile:main && yarn compile:copy2", "compileWatch": "yarn compile:clean && yarn compile:copy && yarn compile:mainWatch", - "compile:clean": "rm -rf ./lib && mkdir lib", + "compile:clean": "rm -rf ./lib && mkdir lib && rm -rf ./production/lib && mkdir production/lib", "compile:copy": "cp src/api.js.flow lib/translate.js.flow", "compile:copy2": "cp src/client/components/aaApp.sass lib/client/components/", "compile:main": "babel src -d lib --ignore \"**/__mocks__/**\",\"**/__tests__/**\"", @@ -58,6 +58,7 @@ "buildAnalysisProd": "yarn build:copyPublic && yarn build:webpack -p --mode production --env.NODE_ENV=production --env.ANALYZE_BUNDLE=true", "build:copyPublic": "cp -r src/public lib", "build:webpack": "webpack --config ./src/webpackConfig.js --color --progress --display-chunks", + "build:production": "cp ./lib/translate.js ./production/lib/ && cp -r ./lib/common ./production/lib/", "travis": "yarn compile && yarn test", "docs": "extract-docs --template docs/templates/README.md --output README.md", "lint": "eslint src", diff --git a/production/LICENSE b/production/LICENSE new file mode 100644 index 0000000..9ca9c48 --- /dev/null +++ b/production/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Guillermo Grau Panea + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/production/README.md b/production/README.md new file mode 100644 index 0000000..edfc59c --- /dev/null +++ b/production/README.md @@ -0,0 +1,31 @@ +# Mady [![npm version](https://img.shields.io/npm/v/mady.svg)](https://www.npmjs.com/package/mady) + +An easy-to-use tool to manage and translate ICU MessageFormat messages. + +This npm package is identical to [mady](https://www.npmjs.com/package/mady) but without the developmeent +tools and dependencies. + +## Installation + +``` +$ npm install --save mady-production +$ npm install --save-dev mady +``` + +## Usage -- The translation function + +When using the translation function import from mady-production instead of from mady. + +```js +import _t from 'mady-production'; +``` + +## License (MIT) + +Copyright (c) [Guillermo Grau Panea](https://github.com/guigrpa) 2016 + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/production/package.json b/production/package.json new file mode 100644 index 0000000..4d55b12 --- /dev/null +++ b/production/package.json @@ -0,0 +1,30 @@ +{ + "name": "mady-production", + "version": "2.11.1", + "description": "Easy-to-use tool to manage and translate ICU MessageFormat messages", + "main": "lib/translate.js", + "engines": { + "node": ">=4" + }, + "author": "Guillermo Grau Panea", + "license": "MIT", + "keywords": [ + "i18n", + "MessageFormat", + "translation", + "locales", + "translator", + "React Intl" + ], + "homepage": "https://github.com/guigrpa/mady#readme", + "bugs": { + "url": "https://github.com/guigrpa/mady/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/guigrpa/mady.git" + }, + "dependencies": { + "buffer": "^5.0.7" + } +}