bpm 0.1.4 → 1.0.0.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +20 -0
- data/README.md +1 -1
- data/TODO.md +90 -2
- data/bpm.gemspec +3 -3
- data/lib/bpm/cli/base.rb +103 -52
- data/lib/bpm/errors.rb +51 -0
- data/lib/bpm/init_generator.rb +1 -8
- data/lib/bpm/libgems_ext/libgems.rb +9 -0
- data/lib/bpm/local.rb +6 -11
- data/lib/bpm/package.rb +272 -178
- data/lib/bpm/pipeline/generated_asset.rb +88 -28
- data/lib/bpm/pipeline/plugin_asset.rb +8 -2
- data/lib/bpm/pipeline/source_url_processor.rb +16 -0
- data/lib/bpm/pipeline/transport_processor.rb +5 -3
- data/lib/bpm/pipeline.rb +33 -23
- data/lib/bpm/project.rb +492 -167
- data/lib/bpm/project_generator.rb +14 -1
- data/lib/bpm/remote.rb +6 -4
- data/lib/bpm/server.rb +4 -15
- data/lib/bpm/version.rb +2 -1
- data/lib/bpm.rb +2 -0
- data/man/bpm-add.1.ronn +22 -0
- data/man/bpm-build.1.ronn +22 -0
- data/man/bpm-compile.1.ronn +23 -0
- data/man/bpm-config.7.ronn +21 -0
- data/man/bpm-fetch.1.ronn +22 -0
- data/man/bpm-fetched.1.ronn +22 -0
- data/man/bpm-init.1.ronn +22 -0
- data/man/bpm-list.1.ronn +22 -0
- data/man/bpm-login.1.ronn +22 -0
- data/man/bpm-new.1.ronn +22 -0
- data/man/bpm-owner.1.ronn +22 -0
- data/man/bpm-preview.1.ronn +22 -0
- data/man/bpm-push.1.ronn +22 -0
- data/man/bpm-remove.1.ronn +22 -0
- data/man/bpm-unpack.1.ronn +22 -0
- data/man/bpm-yank.1.ronn +22 -0
- data/man/bpm.1.ronn +31 -0
- data/spec/cli/add_spec.rb +26 -7
- data/spec/cli/fetch_spec.rb +15 -6
- data/spec/cli/init_spec.rb +165 -25
- data/spec/cli/{build_spec.rb → pack_spec.rb} +9 -10
- data/spec/cli/push_spec.rb +4 -4
- data/spec/cli/rebuild_spec.rb +181 -0
- data/spec/cli/remove_spec.rb +3 -4
- data/spec/cli/unpack_spec.rb +6 -6
- data/spec/fixtures/gems/core-test-0.4.9.bpkg +0 -0
- data/spec/fixtures/{core-test-0.4.9.bpkg → gems/uglify-js-1.0.4.bpkg} +0 -0
- data/spec/fixtures/packages/core-test/extras/extra_file.html +3 -0
- data/spec/fixtures/packages/core-test/index.html +3 -0
- data/spec/fixtures/{core-test → packages/core-test}/package.json +9 -3
- data/spec/fixtures/packages/invalid_json/package.json +3 -0
- data/spec/fixtures/packages/uglify-js/README.html +825 -0
- data/spec/fixtures/packages/uglify-js/README.org +431 -0
- data/spec/fixtures/packages/uglify-js/bin/uglifyjs +305 -0
- data/spec/fixtures/packages/uglify-js/docstyle.css +75 -0
- data/spec/fixtures/packages/uglify-js/lib/parse-js.js +1 -0
- data/spec/fixtures/packages/uglify-js/lib/process.js +1 -0
- data/spec/fixtures/packages/uglify-js/lib/squeeze-more.js +1 -0
- data/spec/fixtures/packages/uglify-js/package.json +27 -0
- data/spec/fixtures/packages/uglify-js/plugins/minifier.js +6 -0
- data/spec/fixtures/packages/uglify-js/uglify-js.js +17 -0
- data/spec/fixtures/projects/hello2/README.md +21 -0
- data/{templates/init → spec/fixtures/projects/hello2}/assets/bpm_packages.js +6 -1
- data/{templates/init → spec/fixtures/projects/hello2}/assets/bpm_styles.css +1 -1
- data/spec/fixtures/projects/hello2/hello2.json +16 -0
- data/spec/fixtures/projects/hello2/index.html +13 -0
- data/spec/fixtures/projects/hello2/packages/a/lib/main.js +2 -0
- data/spec/fixtures/projects/hello2/packages/a/package.json +17 -0
- data/spec/fixtures/projects/hello2/packages/b/lib/main.js +2 -0
- data/spec/fixtures/projects/hello2/packages/b/package.json +17 -0
- data/spec/fixtures/projects/hello2/packages/c/lib/main.js +2 -0
- data/spec/fixtures/projects/hello2/packages/c/package.json +16 -0
- data/spec/fixtures/projects/hello_dev/LICENSE +19 -0
- data/spec/fixtures/projects/hello_dev/README.md +21 -0
- data/spec/fixtures/projects/hello_dev/app/main.js +6 -0
- data/spec/fixtures/projects/hello_dev/assets/bpm_libs.js +5 -0
- data/spec/fixtures/projects/hello_dev/assets/bpm_styles.css +6 -0
- data/spec/fixtures/projects/hello_dev/css/main.css +1 -0
- data/spec/fixtures/projects/hello_dev/hello_dev.json +25 -0
- data/spec/fixtures/projects/hello_dev/index.html +14 -0
- data/spec/fixtures/projects/hello_dev/packages/style_package/css/some_style.css +3 -0
- data/spec/fixtures/{minitest/minitest.json → projects/hello_dev/packages/style_package/package.json} +5 -9
- data/spec/fixtures/projects/hello_world/LICENSE +19 -0
- data/spec/fixtures/projects/hello_world/assets/bpm_packages.js +1 -0
- data/spec/fixtures/projects/hello_world/assets/bpm_styles.css +1 -0
- data/spec/fixtures/projects/hello_world/custom_dir/custom.js +1 -0
- data/spec/fixtures/projects/hello_world/hello_world.json +41 -0
- data/spec/fixtures/projects/hello_world/lib/another.js +1 -0
- data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/package.json +5 -2
- data/spec/fixtures/projects/hello_world/vendor/lib/something.js +1 -0
- data/spec/fixtures/projects/init_app/assets/bpm_libs.js +6 -0
- data/spec/fixtures/projects/init_app/assets/bpm_styles.css +5 -0
- data/spec/fixtures/projects/init_app/assets/new_project/bpm_libs.js +6 -0
- data/spec/fixtures/projects/init_app/assets/new_project/bpm_styles.css +5 -0
- data/spec/fixtures/projects/init_app/new_project.json +27 -0
- data/spec/fixtures/projects/init_default/assets/bpm_libs.js +6 -0
- data/spec/fixtures/projects/init_default/assets/bpm_styles.css +5 -0
- data/spec/fixtures/projects/init_default/new_project.json +15 -0
- data/spec/fixtures/projects/minitest/minitest.json +26 -0
- data/spec/fixtures/{minitest → projects/minitest}/packages/uglyduck/package.json +1 -1
- data/spec/fixtures/projects/needs_rake/needs_rake.json +7 -0
- data/spec/fixtures/{transporter → projects/transporter}/packages/transport/package.json +1 -1
- data/spec/package_spec.rb +343 -315
- data/spec/pipeline_spec.rb +89 -71
- data/spec/plugins/minifier_spec.rb +25 -16
- data/spec/plugins/transport_spec.rb +1 -1
- data/spec/project_spec.rb +97 -34
- data/spec/spec_helper.rb +41 -0
- data/spec/support/fake_gem_server.rb +8 -4
- data/spec/support/path.rb +8 -0
- data/spec/support/project.rb +50 -17
- data/templates/init/project.json +12 -14
- data/templates/project/LICENSE +1 -1
- data/templates/project/app/main.js +6 -0
- data/templates/project/css/main.css +1 -0
- data/templates/project/index.html +4 -3
- data/vendor/sprockets/.travis.yml +3 -2
- data/vendor/sprockets/Gemfile +0 -6
- data/vendor/sprockets/lib/sprockets/asset.rb +7 -12
- data/vendor/sprockets/lib/sprockets/asset_attributes.rb +70 -53
- data/vendor/sprockets/lib/sprockets/base.rb +1 -14
- data/vendor/sprockets/lib/sprockets/bundled_asset.rb +72 -45
- data/vendor/sprockets/lib/sprockets/caching.rb +28 -23
- data/vendor/sprockets/lib/sprockets/context.rb +56 -26
- data/vendor/sprockets/lib/sprockets/directive_processor.rb +21 -4
- data/vendor/sprockets/lib/sprockets/eco_template.rb +3 -4
- data/vendor/sprockets/lib/sprockets/ejs_template.rb +3 -4
- data/vendor/sprockets/lib/sprockets/engines.rb +26 -1
- data/vendor/sprockets/lib/sprockets/environment.rb +2 -1
- data/vendor/sprockets/lib/sprockets/index.rb +1 -0
- data/vendor/sprockets/lib/sprockets/mime.rb +38 -0
- data/vendor/sprockets/lib/sprockets/processing.rb +4 -45
- data/vendor/sprockets/lib/sprockets/static_asset.rb +5 -6
- data/vendor/sprockets/lib/sprockets/static_compilation.rb +4 -12
- data/vendor/sprockets/lib/sprockets/trail.rb +2 -1
- data/vendor/sprockets/test/fixtures/default/blank.gif +0 -0
- data/vendor/sprockets/test/fixtures/default/with_data_uri.css.erb +3 -0
- data/vendor/sprockets/test/test_asset.rb +121 -15
- data/vendor/sprockets/test/test_asset_attributes.rb +85 -21
- data/vendor/sprockets/test/test_environment.rb +13 -36
- metadata +564 -444
- data/spec/cli/new_spec.rb +0 -118
- data/spec/fixtures/hello_world/assets/bpm_packages.js +0 -13
- data/spec/fixtures/hello_world/assets/bpm_styles.css +0 -14
- data/spec/fixtures/hello_world/hello_world.json +0 -20
- /data/spec/fixtures/{badrake-0.8.7.bpkg → gems/badrake-0.8.7.bpkg} +0 -0
- /data/spec/fixtures/{builder-3.0.0.bpkg → gems/builder-3.0.0.bpkg} +0 -0
- /data/spec/fixtures/{bundler-1.1.pre.bpkg → gems/bundler-1.1.pre.bpkg} +0 -0
- /data/spec/fixtures/{coffee-1.0.1.pre.bpkg → gems/coffee-1.0.1.pre.bpkg} +0 -0
- /data/spec/fixtures/{custom_generator-1.0.bpkg → gems/custom_generator-1.0.bpkg} +0 -0
- /data/spec/fixtures/{highline-1.6.1.bpkg → gems/highline-1.6.1.bpkg} +0 -0
- /data/spec/fixtures/{ivory-0.0.1.bpkg → gems/ivory-0.0.1.bpkg} +0 -0
- /data/spec/fixtures/{jquery-1.4.3.bpkg → gems/jquery-1.4.3.bpkg} +0 -0
- /data/spec/fixtures/{optparse-1.0.1.bpkg → gems/optparse-1.0.1.bpkg} +0 -0
- /data/spec/fixtures/{rake-0.8.6.bpkg → gems/rake-0.8.6.bpkg} +0 -0
- /data/spec/fixtures/{rake-0.8.7.bpkg → gems/rake-0.8.7.bpkg} +0 -0
- /data/spec/fixtures/{spade-0.5.0.bpkg → gems/spade-0.5.0.bpkg} +0 -0
- /data/spec/fixtures/{src → packages}/README.txt +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/.gitignore +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/CHANGELOG.md +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/ISSUES.md +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/LICENSE +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/README.md +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/UPGRADING.md +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/bin/bundle +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler/definition.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler/dependency.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler/dsl.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler/ui.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/lib/bundler.js +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-config.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-exec.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-install.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-package.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle-update.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/bundle.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/gemfile.5.ronn +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/man/index.txt +0 -0
- /data/spec/fixtures/{src → packages}/bundler-1.1.pre/package.json +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/bin/cake +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/bin/coffee +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/lib/coffee/base.js +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/lib/coffee/mocha/chai.js +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/lib/coffee.js +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/package.json +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/qunit/coffee/test.js +0 -0
- /data/spec/fixtures/{src → packages}/coffee-1.0.1.pre/qunit/test.js +0 -0
- /data/spec/fixtures/{core-test → packages/core-test}/bin/cot +0 -0
- /data/spec/fixtures/{core-test → packages/core-test}/lib/main.js +0 -0
- /data/spec/fixtures/{core-test → packages/core-test}/resources/runner.css +0 -0
- /data/spec/fixtures/{core-test → packages/core-test}/tests/test.js +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/lib/main.js +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/package.json +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/templates/init/project.json +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/templates/project/app.js +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/templates/project/lib/main.js +0 -0
- /data/spec/fixtures/{custom_generator → packages/custom_generator}/templates/project_generator.rb +0 -0
- /data/spec/fixtures/{src → packages}/jquery/lib/main.js +0 -0
- /data/spec/fixtures/{src → packages}/jquery/package.json +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/CHANGES +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/MIT-LICENSE +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/README +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/Rakefile +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/TODO +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/bin/rake +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/command_line_usage.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/Rakefile1 +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/Rakefile2 +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/a.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/b.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/example/main.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/glossary.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/jamis.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/proto_rake.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/rake.1.gz +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/rakefile.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/rational.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.4.14.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.4.15.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.5.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.5.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.5.4.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.6.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.7.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.7.1.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.7.2.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.7.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.2.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.4.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.5.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/doc/release_notes/rake-0.8.6.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/install.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/alt_system.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/classic_namespace.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/clean.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/compositepublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/ftptools.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/publisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/rubyforgepublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/sshpublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/contrib/sys.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/gempackagetask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/loaders/makefile.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/packagetask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/rake_test_loader.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/rdoctask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/ruby182_test_unit_fix.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/runtest.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/tasklib.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/testtask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake/win32.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/lib/rake.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/package.json +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.6/test/capture_stdout.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/CHANGES +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/MIT-LICENSE +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/README +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/Rakefile +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/TODO +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/bin/rake +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/command_line_usage.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/Rakefile1 +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/Rakefile2 +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/a.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/b.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/example/main.c +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/glossary.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/jamis.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/proto_rake.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/rake.1.gz +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/rakefile.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/rational.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.4.14.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.4.15.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.5.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.5.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.5.4.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.6.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.7.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.7.1.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.7.2.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.7.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.0.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.2.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.3.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.4.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.5.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.6.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/doc/release_notes/rake-0.8.7.rdoc +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/install.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/alt_system.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/classic_namespace.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/clean.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/compositepublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/ftptools.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/publisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/rubyforgepublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/sshpublisher.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/contrib/sys.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/gempackagetask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/loaders/makefile.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/packagetask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/rake_test_loader.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/rdoctask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/ruby182_test_unit_fix.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/runtest.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/tasklib.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/testtask.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake/win32.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/lib/rake.rb +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/package.json +0 -0
- /data/spec/fixtures/{src → packages}/rake-0.8.7/test/capture_stdout.rb +0 -0
- /data/spec/fixtures/{src → packages}/spade/lib/main.js +0 -0
- /data/spec/fixtures/{src → packages}/spade/package.json +0 -0
- /data/spec/fixtures/{custom_name → projects/custom_name}/MyProject.json +0 -0
- /data/spec/fixtures/{hello_world → projects/hello2}/LICENSE +0 -0
- /data/{templates/project → spec/fixtures/projects/hello2}/app.js +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/README.md +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/assets/papa-smurf.jpg +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/css/dummy.css +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/lib/main.js +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/assets/dummy.txt +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/css/sample_styles.css +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/custom_dir/basic-module.js +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/packages/custom_package/lib/main.js +0 -0
- /data/spec/fixtures/{hello_world → projects/hello_world}/tests/main-test.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/assets/bpm_packages.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/assets/bpm_styles.css +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/assets/minitest/app_package.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/lib/main.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/packages/uglyduck/lib/main.js +0 -0
- /data/spec/fixtures/{minitest → projects/minitest}/packages/uglyduck/minifier/main.js +0 -0
- /data/spec/fixtures/{simple_hello/assets/bpm_packages.js → projects/simple_hello/assets/bpm_libs.js} +0 -0
- /data/spec/fixtures/{simple_hello → projects/simple_hello}/lib/main.js +0 -0
- /data/spec/fixtures/{transporter → projects/transporter}/lib/main.js +0 -0
- /data/spec/fixtures/{transporter → projects/transporter}/packages/transport/lib/main.js +0 -0
- /data/spec/fixtures/{transporter → projects/transporter}/packages/transport/transports/wrapper.js +0 -0
- /data/spec/fixtures/{transporter → projects/transporter}/transporter.json +0 -0
@@ -0,0 +1,305 @@
|
|
1
|
+
#! /usr/bin/env node
|
2
|
+
// -*- js -*-
|
3
|
+
|
4
|
+
global.sys = require(/^v0\.[012]/.test(process.version) ? "sys" : "util");
|
5
|
+
var fs = require("fs");
|
6
|
+
var uglify = require("uglify-js"), // symlink ~/.node_libraries/uglify-js.js to ../uglify-js.js
|
7
|
+
jsp = uglify.parser,
|
8
|
+
pro = uglify.uglify;
|
9
|
+
|
10
|
+
var options = {
|
11
|
+
ast: false,
|
12
|
+
mangle: true,
|
13
|
+
mangle_toplevel: false,
|
14
|
+
squeeze: true,
|
15
|
+
make_seqs: true,
|
16
|
+
dead_code: true,
|
17
|
+
verbose: false,
|
18
|
+
show_copyright: true,
|
19
|
+
out_same_file: false,
|
20
|
+
max_line_length: 32 * 1024,
|
21
|
+
unsafe: false,
|
22
|
+
reserved_names: null,
|
23
|
+
defines: { },
|
24
|
+
codegen_options: {
|
25
|
+
ascii_only: false,
|
26
|
+
beautify: false,
|
27
|
+
indent_level: 4,
|
28
|
+
indent_start: 0,
|
29
|
+
quote_keys: false,
|
30
|
+
space_colon: false
|
31
|
+
},
|
32
|
+
make: false,
|
33
|
+
output: true // stdout
|
34
|
+
};
|
35
|
+
|
36
|
+
var args = jsp.slice(process.argv, 2);
|
37
|
+
var filename;
|
38
|
+
|
39
|
+
out: while (args.length > 0) {
|
40
|
+
var v = args.shift();
|
41
|
+
switch (v) {
|
42
|
+
case "-b":
|
43
|
+
case "--beautify":
|
44
|
+
options.codegen_options.beautify = true;
|
45
|
+
break;
|
46
|
+
case "-i":
|
47
|
+
case "--indent":
|
48
|
+
options.codegen_options.indent_level = args.shift();
|
49
|
+
break;
|
50
|
+
case "-q":
|
51
|
+
case "--quote-keys":
|
52
|
+
options.codegen_options.quote_keys = true;
|
53
|
+
break;
|
54
|
+
case "-mt":
|
55
|
+
case "--mangle-toplevel":
|
56
|
+
options.mangle_toplevel = true;
|
57
|
+
break;
|
58
|
+
case "--no-mangle":
|
59
|
+
case "-nm":
|
60
|
+
options.mangle = false;
|
61
|
+
break;
|
62
|
+
case "--no-squeeze":
|
63
|
+
case "-ns":
|
64
|
+
options.squeeze = false;
|
65
|
+
break;
|
66
|
+
case "--no-seqs":
|
67
|
+
options.make_seqs = false;
|
68
|
+
break;
|
69
|
+
case "--no-dead-code":
|
70
|
+
options.dead_code = false;
|
71
|
+
break;
|
72
|
+
case "--no-copyright":
|
73
|
+
case "-nc":
|
74
|
+
options.show_copyright = false;
|
75
|
+
break;
|
76
|
+
case "-o":
|
77
|
+
case "--output":
|
78
|
+
options.output = args.shift();
|
79
|
+
break;
|
80
|
+
case "--overwrite":
|
81
|
+
options.out_same_file = true;
|
82
|
+
break;
|
83
|
+
case "-v":
|
84
|
+
case "--verbose":
|
85
|
+
options.verbose = true;
|
86
|
+
break;
|
87
|
+
case "--ast":
|
88
|
+
options.ast = true;
|
89
|
+
break;
|
90
|
+
case "--unsafe":
|
91
|
+
options.unsafe = true;
|
92
|
+
break;
|
93
|
+
case "--max-line-len":
|
94
|
+
options.max_line_length = parseInt(args.shift(), 10);
|
95
|
+
break;
|
96
|
+
case "--reserved-names":
|
97
|
+
options.reserved_names = args.shift().split(",");
|
98
|
+
break;
|
99
|
+
case "-d":
|
100
|
+
case "--define":
|
101
|
+
var defarg = args.shift();
|
102
|
+
try {
|
103
|
+
var defsym = function(sym) {
|
104
|
+
// KEYWORDS_ATOM doesn't include NaN or Infinity - should we check
|
105
|
+
// for them too ?? We don't check reserved words and the like as the
|
106
|
+
// define values are only substituted AFTER parsing
|
107
|
+
if (jsp.KEYWORDS_ATOM.hasOwnProperty(sym)) {
|
108
|
+
throw "Don't define values for inbuilt constant '"+sym+"'";
|
109
|
+
}
|
110
|
+
return sym;
|
111
|
+
},
|
112
|
+
defval = function(v) {
|
113
|
+
if (v.match(/^"(.*)"$/) || v.match(/^'(.*)'$/)) {
|
114
|
+
return [ "string", RegExp.$1 ];
|
115
|
+
}
|
116
|
+
else if (!isNaN(parseFloat(v))) {
|
117
|
+
return [ "num", parseFloat(v) ];
|
118
|
+
}
|
119
|
+
else if (v.match(/^[a-z\$_][a-z\$_0-9]*$/i)) {
|
120
|
+
return [ "name", v ];
|
121
|
+
}
|
122
|
+
else if (!v.match(/"/)) {
|
123
|
+
return [ "string", v ];
|
124
|
+
}
|
125
|
+
else if (!v.match(/'/)) {
|
126
|
+
return [ "string", v ];
|
127
|
+
}
|
128
|
+
throw "Can't understand the specified value: "+v;
|
129
|
+
};
|
130
|
+
if (defarg.match(/^([a-z_\$][a-z_\$0-9]*)(=(.*))?$/i)) {
|
131
|
+
var sym = defsym(RegExp.$1),
|
132
|
+
val = RegExp.$2 ? defval(RegExp.$2.substr(1)) : [ 'name', 'true' ];
|
133
|
+
options.defines[sym] = val;
|
134
|
+
}
|
135
|
+
else {
|
136
|
+
throw "The --define option expects SYMBOL[=value]";
|
137
|
+
}
|
138
|
+
} catch(ex) {
|
139
|
+
sys.print("ERROR: In option --define "+defarg+"\n"+ex+"\n");
|
140
|
+
process.exit(1);
|
141
|
+
}
|
142
|
+
break;
|
143
|
+
case "--define-from-module":
|
144
|
+
var defmodarg = args.shift(),
|
145
|
+
defmodule = require(defmodarg),
|
146
|
+
sym,
|
147
|
+
val;
|
148
|
+
for (sym in defmodule) {
|
149
|
+
if (defmodule.hasOwnProperty(sym)) {
|
150
|
+
options.defines[sym] = function(val) {
|
151
|
+
if (typeof val == "string")
|
152
|
+
return [ "string", val ];
|
153
|
+
if (typeof val == "number")
|
154
|
+
return [ "num", val ];
|
155
|
+
if (val === true)
|
156
|
+
return [ 'name', 'true' ];
|
157
|
+
if (val === false)
|
158
|
+
return [ 'name', 'false' ];
|
159
|
+
if (val === null)
|
160
|
+
return [ 'name', 'null' ];
|
161
|
+
if (val === undefined)
|
162
|
+
return [ 'name', 'undefined' ];
|
163
|
+
sys.print("ERROR: In option --define-from-module "+defmodarg+"\n");
|
164
|
+
sys.print("ERROR: Unknown object type for: "+sym+"="+val+"\n");
|
165
|
+
process.exit(1);
|
166
|
+
return null;
|
167
|
+
}(defmodule[sym]);
|
168
|
+
}
|
169
|
+
}
|
170
|
+
break;
|
171
|
+
case "--ascii":
|
172
|
+
options.codegen_options.ascii_only = true;
|
173
|
+
break;
|
174
|
+
case "--make":
|
175
|
+
options.make = true;
|
176
|
+
break;
|
177
|
+
default:
|
178
|
+
filename = v;
|
179
|
+
break out;
|
180
|
+
}
|
181
|
+
}
|
182
|
+
|
183
|
+
if (options.verbose) {
|
184
|
+
pro.set_logger(function(msg){
|
185
|
+
sys.debug(msg);
|
186
|
+
});
|
187
|
+
}
|
188
|
+
|
189
|
+
jsp.set_logger(function(msg){
|
190
|
+
sys.debug(msg);
|
191
|
+
});
|
192
|
+
|
193
|
+
if (options.make) {
|
194
|
+
options.out_same_file = false; // doesn't make sense in this case
|
195
|
+
var makefile = JSON.parse(fs.readFileSync(filename || "Makefile.uglify.js").toString());
|
196
|
+
output(makefile.files.map(function(file){
|
197
|
+
var code = fs.readFileSync(file.name);
|
198
|
+
if (file.module) {
|
199
|
+
code = "!function(exports, global){global = this;\n" + code + "\n;this." + file.module + " = exports;}({})";
|
200
|
+
}
|
201
|
+
else if (file.hide) {
|
202
|
+
code = "(function(){" + code + "}());";
|
203
|
+
}
|
204
|
+
return squeeze_it(code);
|
205
|
+
}).join("\n"));
|
206
|
+
}
|
207
|
+
else if (filename) {
|
208
|
+
fs.readFile(filename, "utf8", function(err, text){
|
209
|
+
if (err) throw err;
|
210
|
+
output(squeeze_it(text));
|
211
|
+
});
|
212
|
+
}
|
213
|
+
else {
|
214
|
+
var stdin = process.openStdin();
|
215
|
+
stdin.setEncoding("utf8");
|
216
|
+
var text = "";
|
217
|
+
stdin.on("data", function(chunk){
|
218
|
+
text += chunk;
|
219
|
+
});
|
220
|
+
stdin.on("end", function() {
|
221
|
+
output(squeeze_it(text));
|
222
|
+
});
|
223
|
+
}
|
224
|
+
|
225
|
+
function output(text) {
|
226
|
+
var out;
|
227
|
+
if (options.out_same_file && filename)
|
228
|
+
options.output = filename;
|
229
|
+
if (options.output === true) {
|
230
|
+
out = process.stdout;
|
231
|
+
} else {
|
232
|
+
out = fs.createWriteStream(options.output, {
|
233
|
+
flags: "w",
|
234
|
+
encoding: "utf8",
|
235
|
+
mode: 0644
|
236
|
+
});
|
237
|
+
}
|
238
|
+
out.write(text);
|
239
|
+
if (options.output !== true) {
|
240
|
+
out.end();
|
241
|
+
}
|
242
|
+
};
|
243
|
+
|
244
|
+
// --------- main ends here.
|
245
|
+
|
246
|
+
function show_copyright(comments) {
|
247
|
+
var ret = "";
|
248
|
+
for (var i = 0; i < comments.length; ++i) {
|
249
|
+
var c = comments[i];
|
250
|
+
if (c.type == "comment1") {
|
251
|
+
ret += "//" + c.value + "\n";
|
252
|
+
} else {
|
253
|
+
ret += "/*" + c.value + "*/";
|
254
|
+
}
|
255
|
+
}
|
256
|
+
return ret;
|
257
|
+
};
|
258
|
+
|
259
|
+
function squeeze_it(code) {
|
260
|
+
var result = "";
|
261
|
+
if (options.show_copyright) {
|
262
|
+
var tok = jsp.tokenizer(code), c;
|
263
|
+
c = tok();
|
264
|
+
result += show_copyright(c.comments_before);
|
265
|
+
}
|
266
|
+
try {
|
267
|
+
var ast = time_it("parse", function(){ return jsp.parse(code); });
|
268
|
+
if (options.mangle) ast = time_it("mangle", function(){
|
269
|
+
return pro.ast_mangle(ast, {
|
270
|
+
toplevel: options.mangle_toplevel,
|
271
|
+
defines: options.defines,
|
272
|
+
except: options.reserved_names
|
273
|
+
});
|
274
|
+
});
|
275
|
+
if (options.squeeze) ast = time_it("squeeze", function(){
|
276
|
+
ast = pro.ast_squeeze(ast, {
|
277
|
+
make_seqs : options.make_seqs,
|
278
|
+
dead_code : options.dead_code,
|
279
|
+
keep_comps : !options.unsafe
|
280
|
+
});
|
281
|
+
if (options.unsafe)
|
282
|
+
ast = pro.ast_squeeze_more(ast);
|
283
|
+
return ast;
|
284
|
+
});
|
285
|
+
if (options.ast)
|
286
|
+
return sys.inspect(ast, null, null);
|
287
|
+
result += time_it("generate", function(){ return pro.gen_code(ast, options.codegen_options) });
|
288
|
+
if (!options.codegen_options.beautify && options.max_line_length) {
|
289
|
+
result = time_it("split", function(){ return pro.split_lines(result, options.max_line_length) });
|
290
|
+
}
|
291
|
+
return result;
|
292
|
+
} catch(ex) {
|
293
|
+
sys.debug(ex.stack);
|
294
|
+
sys.debug(sys.inspect(ex));
|
295
|
+
sys.debug(JSON.stringify(ex));
|
296
|
+
}
|
297
|
+
};
|
298
|
+
|
299
|
+
function time_it(name, cont) {
|
300
|
+
if (!options.verbose)
|
301
|
+
return cont();
|
302
|
+
var t1 = new Date().getTime();
|
303
|
+
try { return cont(); }
|
304
|
+
finally { sys.debug("// " + name + ": " + ((new Date().getTime() - t1) / 1000).toFixed(3) + " sec."); }
|
305
|
+
};
|
@@ -0,0 +1,75 @@
|
|
1
|
+
html { font-family: "Lucida Grande","Trebuchet MS",sans-serif; font-size: 12pt; }
|
2
|
+
body { max-width: 60em; }
|
3
|
+
.title { text-align: center; }
|
4
|
+
.todo { color: red; }
|
5
|
+
.done { color: green; }
|
6
|
+
.tag { background-color:lightblue; font-weight:normal }
|
7
|
+
.target { }
|
8
|
+
.timestamp { color: grey }
|
9
|
+
.timestamp-kwd { color: CadetBlue }
|
10
|
+
p.verse { margin-left: 3% }
|
11
|
+
pre {
|
12
|
+
border: 1pt solid #AEBDCC;
|
13
|
+
background-color: #F3F5F7;
|
14
|
+
padding: 5pt;
|
15
|
+
font-family: monospace;
|
16
|
+
font-size: 90%;
|
17
|
+
overflow:auto;
|
18
|
+
}
|
19
|
+
pre.src {
|
20
|
+
background-color: #eee; color: #112; border: 1px solid #000;
|
21
|
+
}
|
22
|
+
table { border-collapse: collapse; }
|
23
|
+
td, th { vertical-align: top; }
|
24
|
+
dt { font-weight: bold; }
|
25
|
+
div.figure { padding: 0.5em; }
|
26
|
+
div.figure p { text-align: center; }
|
27
|
+
.linenr { font-size:smaller }
|
28
|
+
.code-highlighted {background-color:#ffff00;}
|
29
|
+
.org-info-js_info-navigation { border-style:none; }
|
30
|
+
#org-info-js_console-label { font-size:10px; font-weight:bold;
|
31
|
+
white-space:nowrap; }
|
32
|
+
.org-info-js_search-highlight {background-color:#ffff00; color:#000000;
|
33
|
+
font-weight:bold; }
|
34
|
+
|
35
|
+
sup {
|
36
|
+
vertical-align: baseline;
|
37
|
+
position: relative;
|
38
|
+
top: -0.5em;
|
39
|
+
font-size: 80%;
|
40
|
+
}
|
41
|
+
|
42
|
+
sup a:link, sup a:visited {
|
43
|
+
text-decoration: none;
|
44
|
+
color: #c00;
|
45
|
+
}
|
46
|
+
|
47
|
+
sup a:before { content: "["; color: #999; }
|
48
|
+
sup a:after { content: "]"; color: #999; }
|
49
|
+
|
50
|
+
h1.title { border-bottom: 4px solid #000; padding-bottom: 5px; margin-bottom: 2em; }
|
51
|
+
|
52
|
+
#postamble {
|
53
|
+
color: #777;
|
54
|
+
font-size: 90%;
|
55
|
+
padding-top: 1em; padding-bottom: 1em; border-top: 1px solid #999;
|
56
|
+
margin-top: 2em;
|
57
|
+
padding-left: 2em;
|
58
|
+
padding-right: 2em;
|
59
|
+
text-align: right;
|
60
|
+
}
|
61
|
+
|
62
|
+
#postamble p { margin: 0; }
|
63
|
+
|
64
|
+
#footnotes { border-top: 1px solid #000; }
|
65
|
+
|
66
|
+
h1 { font-size: 200% }
|
67
|
+
h2 { font-size: 175% }
|
68
|
+
h3 { font-size: 150% }
|
69
|
+
h4 { font-size: 125% }
|
70
|
+
|
71
|
+
h1, h2, h3, h4 { font-family: "Bookman",Georgia,"Times New Roman",serif; font-weight: normal; }
|
72
|
+
|
73
|
+
@media print {
|
74
|
+
html { font-size: 11pt; }
|
75
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
// do nothingi
|
@@ -0,0 +1 @@
|
|
1
|
+
// do nothingi
|
@@ -0,0 +1 @@
|
|
1
|
+
// do nothingi
|
@@ -0,0 +1,27 @@
|
|
1
|
+
{
|
2
|
+
"name" : "uglify-js",
|
3
|
+
|
4
|
+
"author" : "Mihai Bazon",
|
5
|
+
|
6
|
+
"summary": "AST-powered minifier for JavaScript",
|
7
|
+
"description": "Minify JavaScript applications. Includes plugin support for bpm.",
|
8
|
+
|
9
|
+
"version" : "1.0.4",
|
10
|
+
|
11
|
+
"repository": {
|
12
|
+
"type": "git",
|
13
|
+
"url": "git@github.com:mishoo/UglifyJS.git"
|
14
|
+
},
|
15
|
+
|
16
|
+
"homepage": "http://github.com/getbpm/UglifyJS",
|
17
|
+
|
18
|
+
"bpm:minifier": "uglify-js/plugins/minifier",
|
19
|
+
|
20
|
+
"directories": {
|
21
|
+
"lib": "lib",
|
22
|
+
"plugins": "plugins"
|
23
|
+
},
|
24
|
+
|
25
|
+
"dependencies": {
|
26
|
+
}
|
27
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
//convienence function(src, [options]);
|
2
|
+
function uglify(orig_code, options){
|
3
|
+
options || (options = {});
|
4
|
+
var jsp = uglify.parser;
|
5
|
+
var pro = uglify.uglify;
|
6
|
+
|
7
|
+
var ast = jsp.parse(orig_code, options.strict_semicolons); // parse code and get the initial AST
|
8
|
+
ast = pro.ast_mangle(ast, options.mangle_options); // get a new AST with mangled names
|
9
|
+
ast = pro.ast_squeeze(ast, options.squeeze_options); // get an AST with compression optimizations
|
10
|
+
var final_code = pro.gen_code(ast, options.gen_options); // compressed code here
|
11
|
+
return final_code;
|
12
|
+
};
|
13
|
+
|
14
|
+
uglify.parser = require("./lib/parse-js");
|
15
|
+
uglify.uglify = require("./lib/process");
|
16
|
+
|
17
|
+
module.exports = uglify
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# hello2
|
2
|
+
|
3
|
+
### Description:
|
4
|
+
|
5
|
+
FIX (describe your package)
|
6
|
+
|
7
|
+
### Features / Problems:
|
8
|
+
|
9
|
+
* FIX (list of features or problems)
|
10
|
+
|
11
|
+
### Synopsis:
|
12
|
+
|
13
|
+
FIX (code sample of usage)
|
14
|
+
|
15
|
+
### Requirements:
|
16
|
+
|
17
|
+
* FIX (list of requirements)
|
18
|
+
|
19
|
+
### Install:
|
20
|
+
|
21
|
+
* FIX (describe how to install)
|
@@ -1,7 +1,12 @@
|
|
1
1
|
/* ===========================================================================
|
2
2
|
BPM Static Dependencies
|
3
|
-
MANIFEST: (
|
3
|
+
MANIFEST: a (1.0.0) b (1.0.0) c (1.0.0)
|
4
4
|
This file is generated automatically by the bpm (http://www.bpmjs.org)
|
5
5
|
To use this file, load this file in your HTML head.
|
6
6
|
=========================================================================*/
|
7
7
|
|
8
|
+
// HELLO A
|
9
|
+
|
10
|
+
// HELLO B
|
11
|
+
|
12
|
+
// HELLO C
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ===========================================================================
|
2
2
|
BPM Static Dependencies
|
3
|
-
MANIFEST: (
|
3
|
+
MANIFEST: a (1.0.0) b (1.0.0) c (1.0.0)
|
4
4
|
This file is generated automatically by the bpm (http://www.bpmjs.org)
|
5
5
|
To use this file, load this file in your HTML head.
|
6
6
|
=========================================================================*/
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"directories": {
|
3
|
+
"lib": "lib",
|
4
|
+
"tests": "tests"
|
5
|
+
},
|
6
|
+
"name": "hello2",
|
7
|
+
"version": "0.0.1",
|
8
|
+
"description": "DESCRIPTION HERE",
|
9
|
+
"author": "YOUR NAME HERE",
|
10
|
+
"homepage": "URL",
|
11
|
+
"summary": null,
|
12
|
+
"dependencies": {
|
13
|
+
"a": ">= 0"
|
14
|
+
},
|
15
|
+
"bpm": "1.0.0.beta.1.pre"
|
16
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<html>
|
2
|
+
<head>
|
3
|
+
<script type="text/javascript" src="assets/bpm_libs.js"></script>
|
4
|
+
<script type="text/javascript" src="app.js"></script>
|
5
|
+
|
6
|
+
<link rel="stylesheet" href="assets/bpm_styles.css" type="text/css" media="screen" charset="utf-8" />
|
7
|
+
|
8
|
+
<title>hello2</title>
|
9
|
+
</head>
|
10
|
+
<body>
|
11
|
+
<h1>Hello World</h1>
|
12
|
+
</body>
|
13
|
+
</html>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2011 My Company Inc.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# hello_dev
|
2
|
+
|
3
|
+
### Description:
|
4
|
+
|
5
|
+
FIX (describe your package)
|
6
|
+
|
7
|
+
### Features / Problems:
|
8
|
+
|
9
|
+
* FIX (list of features or problems)
|
10
|
+
|
11
|
+
### Synopsis:
|
12
|
+
|
13
|
+
FIX (code sample of usage)
|
14
|
+
|
15
|
+
### Requirements:
|
16
|
+
|
17
|
+
* FIX (list of requirements)
|
18
|
+
|
19
|
+
### Install:
|
20
|
+
|
21
|
+
* FIX (describe how to install)
|
@@ -0,0 +1,6 @@
|
|
1
|
+
// ==========================================================================
|
2
|
+
// Project: hello_dev
|
3
|
+
// Copyright: ©2011 My Company Inc. All rights reserved.
|
4
|
+
// ==========================================================================
|
5
|
+
|
6
|
+
// TODO: Your app code goes here
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/* ===========================================================================
|
2
|
+
BPM Combined Asset File
|
3
|
+
MANIFEST: EMPTY
|
4
|
+
This file is generated automatically by the bpm (http://www.bpmjs.org)
|
5
|
+
=========================================================================*/
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/* ===========================================================================
|
2
|
+
BPM Combined Asset File
|
3
|
+
MANIFEST: spade (0.1.2) uglify-js (1.0.4)
|
4
|
+
This file is generated automatically by the bpm (http://www.bpmjs.org)
|
5
|
+
=========================================================================*/
|
6
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
/* TODO: Add your app CSS here */
|