Skip to content

Commit

Permalink
Fixes #861 copy license file
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Jul 26, 2017
1 parent 99ea6b1 commit df6986e
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 26 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"documentation": "4.0.0-beta7",
"eslint": "^2.0.0",
"eslint-config-mourner": "^2.0.0",
"fs-extra": "^4.0.0",
"lerna": "2.0.0-beta.34",
"load-json-file": "^2.0.0",
"meow": "^3.7.0",
Expand Down
28 changes: 3 additions & 25 deletions scripts/create-new-module
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env node

const fs = require('fs');
const fs = require('fs-extra');
const path = require('path');
const meow = require('meow');
const camelcase = require('camelcase');
Expand Down Expand Up @@ -90,27 +90,8 @@ fs.writeFileSync(path.join(folderPath, 'package.json'), `{
`);

// Create LICENSE
fs.writeFileSync(path.join(folderPath, 'LICENSE'), `The MIT License (MIT)
Copyright (c) 2017 TurfJS
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.
`);
const license = path.join(__dirname, '..', 'packages', 'turf', 'LICENSE');
fs.copySync(license, path.join(folderPath, 'LICENSE'));

// Create index.d.ts
fs.writeFileSync(path.join(folderPath, 'index.d.ts'), `/// <reference types="geojson" />
Expand Down Expand Up @@ -187,9 +168,6 @@ test('turf-${decamelizeName}', t => {
});
`);

// Create geojson files
fs.writeFileSync(path.join(folderPath, 'test/in/feature.geojson'), `<GeoJSON>`);
fs.writeFileSync(path.join(folderPath, 'test/out/feature.geojson'), `<GeoJSON>`);

// Create README.md
fs.writeFileSync(path.join(folderPath, 'README.md'), `# @turf/${decamelizeName}
Expand Down
20 changes: 19 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2072,6 +2072,14 @@ fs-exists-cached@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz#cf25554ca050dc49ae6656b41de42258989dcbce"

fs-extra@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.0.tgz#414fb4ca2d2170ba0014159d3a8aec3303418d9e"
dependencies:
graceful-fs "^4.1.2"
jsonfile "^3.0.0"
universalify "^0.1.0"

fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
Expand Down Expand Up @@ -2262,7 +2270,7 @@ globby@^5.0.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"

graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2:
graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"

Expand Down Expand Up @@ -2835,6 +2843,12 @@ json5@^0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"

jsonfile@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66"
optionalDependencies:
graceful-fs "^4.1.6"

jsonify@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"
Expand Down Expand Up @@ -4687,6 +4701,10 @@ unist-util-visit@^1.0.0, unist-util-visit@^1.0.1, unist-util-visit@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.1.1.tgz#e917a3b137658b335cb4420c7da2e74d928e4e94"

universalify@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"

[email protected]:
version "1.0.0"
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
Expand Down

0 comments on commit df6986e

Please sign in to comment.