JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 112180
  • Score
    100M100P100Q166274F
  • License MIT

Tiny license detector module for UglifyJS's 'comments' option

Package Exports

  • uglify-save-license

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (uglify-save-license) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

uglify-save-license

Tiny license detector module for UglifyJS's 'comments' option

Installation

Install latest stable Node and run this command: in your project directory:

npm install --save-dev uglify-save-license

Usage

Coming soon.

Example

use with grunt-contrib-uglify

module.exports = (grunt) ->
  'use strict'

  grunt.loadNpmTasks 'grunt-contrib-uglify'
  grunt.loadNpmTasks 'grunt-contrib-concat'
  grunt.loadNpmTasks 'grunt-contrib-clean'
  
  saveLicense = require 'uglify-save-license'

  grunt.initConfig
    uglify:
      target:
        options:
          preserveComments: saveLicense
        files: [
          expand: true
          flatten: true
          cwd: 'path/to/src'
          src: ["**/*.js"]
          dest: 'tmp/'
        ]

    concat:
      script:
        src: ['tmp/*.js']
        dest: 'path/to/build/app.js'

    clean:
      tmpfiles: ['tmp']

  grunt.registerTask 'default' [
    'uglify'
    'concat'
    'clean'
  ]

License

Copyright (c) 2013 Shinnosuke Watanabe All rights reserved.

Licensed under the MIT license.