Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License from LICENSE file #25

Closed
ScorpAL opened this issue Mar 1, 2018 · 2 comments
Closed

License from LICENSE file #25

ScorpAL opened this issue Mar 1, 2018 · 2 comments
Assignees

Comments

@ScorpAL
Copy link

ScorpAL commented Mar 1, 2018

Example:

package.json of (just as example) node_modules/can-ajax have no any key with license.
But node_modules/can-ajax have files LICENSE and README.md:

file LICENSE

MIT License

Copyright (c) 2017 CanJS

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.

README.md


# can-ajax

[![Join the chat at https://gitter.im/canjs/canjs](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/canjs/canjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/canjs/can-ajax/blob/master/LICENSE)
[![npm version](https://badge.fury.io/js/can-ajax.svg)](https://www.npmjs.com/package/can-ajax)
[![Travis build status](https://travis-ci.org/canjs/can-ajax.svg?branch=master)](https://travis-ci.org/canjs/can-ajax)
[![Greenkeeper badge](https://badges.greenkeeper.io/canjs/can-ajax.svg)](https://greenkeeper.io/)

jQuery-inspired AJAX request library.

## Documentation

Read the [can-ajax API docs on CanJS.com](https://canjs.com/doc/can-ajax.html).

## Changelog

See the [latest releases on GitHub](https://github.com/canjs/can-ajax/releases).

## Contributing

The [contribution guide](https://github.com/canjs/can-ajax/blob/master/CONTRIBUTING.md) has information on getting help, reporting bugs, developing locally, and more.

## License

[MIT](https://github.com/canjs/can-ajax/blob/master/LICENSE)

My config is:

        new LicenseWebpackPlugin({
                pattern: /.*/,
                licenseFilenames: [ // list of filenames to search for in each package
                    'LICENSE',
                    'LICENSE.md',
                    'LICENSE.txt',
                    'license',
                    'license.md',
                    'license.txt',
                    'README',
                    'README.md',
                    'README.txt',
                    'readme',
                    'readme.md',
                    'readme.txt'
                ],
                outputTemplate: 'output.template.ejs',
                outputFilename: '[name].licenses.html',
                includePackagesWithoutLicense: true,
                addBanner: true,
                bannerTemplate: '/*! 3rd party license information is available at <%- filename %> */'
            })

as result I have Unknown license on output.

Why?

@xz64
Copy link
Owner

xz64 commented Mar 3, 2018

The can-ajax package is missing a "license" field in its package.json which is why the plugin isn't producing any output for this package.

Because the plugin filters packages by a license identifier regex, it must know the type of license for a project before it can extract the license text.

The plugin supports a licenseTypeOverrides option to handle these scenarios.

Example:

licenseTypeOverrides: {                                                 
  'can-ajax': 'MIT'                                                     
}  

I need to update the README to explain this option.

@xz64 xz64 self-assigned this Mar 4, 2018
xz64 added a commit that referenced this issue Mar 4, 2018
@xz64
Copy link
Owner

xz64 commented Mar 4, 2018

I've added some documentation to v1.2.0 which clarifies this feature. Let me know if you have any questions

@xz64 xz64 closed this as completed Mar 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants