From d1f4deb44855da9dc551bacedadb8a01f2e6e473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Wed, 8 Aug 2018 17:56:12 +0200 Subject: [PATCH] license: Add banner on build and add our contributors to the list --- LICENSE.md | 1 + package.json | 3 ++- scripts/rollup/rollup.config.js | 17 ++++++++++++++++- yarn.lock | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 2 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index 452fd79abb..f8f29fca7f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -5,6 +5,7 @@ Copyright (c) 2016-2018 - Alexandre Chopin ([@alexchopin](https://github.com/alexchopin)) - Pooya Parsa ([@pi0](https://github.com/pi0)) - Clark Du ([@clarkdo](https://github.com/clarkdo)) +- All the amazing contributors (https://github.com/nuxt/nuxt.js/graphs/contributors) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package.json b/package.json index 70f30b4ef3..ecb2bdd533 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,8 @@ "rollup": "^0.59.4", "rollup-plugin-babel": "^3.0.4", "rollup-plugin-commonjs": "^9.1.3", - "rollup-plugin-json": "^3.0.0" + "rollup-plugin-json": "^3.0.0", + "rollup-plugin-license": "^0.7.0" }, "collective": { "type": "opencollective", diff --git a/scripts/rollup/rollup.config.js b/scripts/rollup/rollup.config.js index ceb1e2f776..b021aee557 100644 --- a/scripts/rollup/rollup.config.js +++ b/scripts/rollup/rollup.config.js @@ -1,6 +1,8 @@ import json from 'rollup-plugin-json' import commonjs from 'rollup-plugin-commonjs' +import license from 'rollup-plugin-license' import defaultsDeep from 'lodash/defaultsDeep' +import { version } from '../../package.json' import externals from './externals' @@ -14,6 +16,19 @@ export default ({ name, input, plugins = [], options }) => defaultsDeep({}, opti external: externals, plugins: [ commonjs(), - json() + json(), + license({ + banner: '/*!\n' + + ' * Nuxt.js v' + version + '\n' + + ' * (c) 2016-' + new Date().getFullYear() + '\n' + + ' * - Sébastien Chopin (@Atinux)\n' + + ' * - Alexandre Chopin (@alexchopin)\n' + + ' * - Pooya Parsa (@pi0)\n' + + ' * - Clark Du (@clarkdo)\n' + + ' * - All the amazing contributors\n' + + ' * Released under the MIT License.\n' + + ' * Website: https://nuxtjs.org\n' + + ' */' + }) ].concat(plugins) }) diff --git a/yarn.lock b/yarn.lock index ff2f718a91..5d4777d685 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1805,6 +1805,10 @@ commander@~2.13.0: version "2.13.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" +commenting@1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/commenting/-/commenting-1.0.5.tgz#3104d542cac8a4f27b3d51438f4b80431fe4526b" + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -4637,6 +4641,10 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" +lodash@4.17.9: + version "4.17.9" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.9.tgz#9c056579af0bdbb4322e23c836df13ef2b271cb7" + lodash@^3.10.1: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" @@ -4702,6 +4710,12 @@ lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.2, lru-cache@^4.1.3: pseudomap "^1.0.2" yallist "^2.1.2" +magic-string@0.25.0: + version "0.25.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.0.tgz#1f3696f9931ff0a1ed4c132250529e19cad6759b" + dependencies: + sourcemap-codec "^1.4.1" + magic-string@^0.22.4: version "0.22.5" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" @@ -4934,6 +4948,10 @@ mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: dependencies: minimist "0.0.8" +moment@2.22.2: + version "2.22.2" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" + move-concurrently@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92" @@ -6732,6 +6750,16 @@ rollup-plugin-json@^3.0.0: dependencies: rollup-pluginutils "^2.2.0" +rollup-plugin-license@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-license/-/rollup-plugin-license-0.7.0.tgz#908101f56d2c1e6311aa2d422eb41732063d5389" + dependencies: + commenting "1.0.5" + lodash "4.17.9" + magic-string "0.25.0" + mkdirp "0.5.1" + moment "2.22.2" + rollup-pluginutils@^1.5.0: version "1.5.2" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-1.5.2.tgz#1e156e778f94b7255bfa1b3d0178be8f5c552408" @@ -7030,6 +7058,10 @@ source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" +sourcemap-codec@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2" + spdx-correct@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.0.0.tgz#05a5b4d7153a195bc92c3c425b69f3b2a9524c82"