Giter Site home page Giter Site logo

generate / generate-license Goto Github PK

View Code? Open in Web Editor NEW
84.0 6.0 10.0 950 KB

Generate a license file from the command line when Generate is installed globally, or use this generator as a plugin or sub-generator in your own generator project.

License: MIT License

JavaScript 100.00%
license mit generate generator scaffolder scaffolding scaffold yeoman yo project

generate-license's People

Contributors

doowb avatar jonschlinkert avatar pointnet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

generate-license's Issues

Not working with npx

Instead of installing anything globally, I've moved to use npx which comes with npm 5, which is default with node 8

Expected this to work:

$ npx -p generate -p generate-license gen license

Instead I get this error trace

$ npx -p generate -p generate-license gen license
npx: installed 1432 in 18.068s
[14:41:45] starting generate
[14:41:45] ✔ running tasks: [ 'license' ]
Error: Cannot find generator: "license" in "/home/grahamm/<project_dir>"
    at Generate.<anonymous> (/home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/base-generators/index.js:499:18)
    at iterate (/home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/async-each-series/index.js:8:5)
    at Function.module.exports (/home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/async-each-series/index.js:20:3)
    at Generate.generate (/home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/base-generators/index.js:492:15)
    at /home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/base-generators/index.js:475:18
    at iterate (/home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/async-each-series/index.js:8:5)
    at Function.module.exports (/home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/async-each-series/index.js:20:3)
    at Generate.generate (/home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/base-generators/index.js:474:24)
    at Generate.generate (/home/grahamm/.npm/_npx/7206/lib/node_modules/generate/node_modules/base-generators/index.js:463:23)
    at /home/grahamm/.npm/_npx/7206/lib/node_modules/generate/bin/generate.js:117:11

Generating GPLv3 license leaves placeholder fields verbatim

Hello,

When generating a gpl3 LICENSE file, it's contents contain the following blocks (lines 634 and 655):

    {one line to give the program's name and a brief idea of what it does.}
    Copyright (C) {year}  {name of author}
    {project}  Copyright (C) {year}  {fullname}
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

I think this tool should ask me for these values and populate them in my stead.

generate-license version 1.0.0, as reported by my package lock.

Copyright License

Didn't find any "all rights reserved" license template here.

Maybe smth like that?

All Rights Reserved

Copyright (c) ${year} ${owner}

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY.
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.

Windows Gen-License Failed

Specifications

OS: Windows
Shell: PowerShell
Terminal Emulator: Windows Terminal
nvm version: 1.1.12
nodejs version: [lts] 20.11.0

Replicate

npm install -g generate generate-license
gen readme

image

year is not defined

[master●] % gen license
[03:56:28] starting generate
[03:56:29] ✔ running tasks: [ 'license' ]
[03:56:29] starting license 
[03:56:29] starting license:default task 
[03:56:29] starting license:license task 
[03:56:29] starting license 
[03:56:29] starting license:choose task 
? Choose the license to generate license-mit
[03:56:31] starting license 
{ ReferenceError: year is not defined
    at eval (engine.templateSources[1]:9:11)
    at renderSync (/home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate-license/node_modules/engine-base/index.js:135:12)
    at render (/home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate-license/node_modules/engine-base/index.js:173:14)
    at /home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate/node_modules/engine-cache/index.js:244:7
    at Object.engineRender [as render] (/home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate/node_modules/engine-cache/index.js:280:7)
    at /home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate/node_modules/templates/lib/plugins/render.js:313:16
    at /home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate/node_modules/base-routes/index.js:168:9
    at /home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate/node_modules/base-routes/index.js:168:9
    at /home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate/node_modules/en-route/lib/index.js:576:15
    at next (/home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate/node_modules/en-route/lib/index.js:161:14)
  files: [ <File "LICENSE" <Buffer 54 68 65 20 4d 49 54 20 4c 69 63 65 6e 73 65 20 28 4d 49 54 29 0a 0a 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 3c 25 3d 20 79 65 61 72 20 25 3e 20 3c ... >> ],
  handled: [ <File "LICENSE" <Buffer 54 68 65 20 4d 49 54 20 4c 69 63 65 6e 73 65 20 28 4d 49 54 29 0a 0a 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 3c 25 3d 20 79 65 61 72 20 25 3e 20 3c ... >> ],
  view: <File "LICENSE" <Buffer 54 68 65 20 4d 49 54 20 4c 69 63 65 6e 73 65 20 28 4d 49 54 29 0a 0a 43 6f 70 79 72 69 67 68 74 20 28 63 29 20 3c 25 3d 20 79 65 61 72 20 25 3e 20 3c ... >>,
  path: '/home/jamen/.nvm/versions/node/v6.5.0/lib/node_modules/generate-license/templates/LICENSE' }

After choosing MIT.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.