Giter VIP home page Giter VIP logo

bpm's Introduction

bpm - browser packager manager

bpm is a system for managing resource dependencies for client-side browser applications. It is inspired by npm, but has better support for the unique needs of browser applications including:

  • Supports multiple module loaders (i.e. you can choose RequireJS, spade or even no loader at all)
  • Handles non-JS assets such as CSS and images. (Support for SCSS/Sass coming soon)
  • Can autocompile other languages such as CoffeeScript.

bpm also implements a basic build system that generates cache-optimized assets.

Finally, bpm is based on the rubygems library. Although you don't need to know any ruby to use bpm, this means that we also benefit from nearly 10 years of lessons learned to jump start bpm.

Workflow Quick Start

Once you have bpm installed (see below), create a demo app like so:

bpm init my_app
cd my_app

Then add jquery as a dependency:

bpm add jquery

This will create a file called assets/bpm_libs which will include jquery. You can then create an index.html and reference that js. Everytime you add a dependency, it will be based into this JS file .

Note that there is also a CSS file at assets/bpm_styles.css - we do the same thing there.

Installing

See http://www.getbpm.org/pages/download

Additional Documentation

https://github.com/bpm/bpm/wiki

bpm's People

Contributors

florish avatar jasonpgignac avatar wagenet 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bpm's Issues

Windows Support

Currently therubyracer doesn't work on Windows. We need to either fix therubyracer or remove the dependency.

You should be able to include individual files in a bpm:build section

A lot of projects publish the actual JS and CSS files in the top level of a project. We should be able to simply name those files in the bpm:build instead of just directories. Recommend in the process we rename directive from directories to files. Maybe we even support both for compatibility. Ex:

   "bpm:build": {
      "bpm_libs.js": {
          "files": ["webintents.js"]  // <- includes the webintents.js file at the top level specifically.
     }
  }

This would significantly ease getting existing packages published in BPM.

1.0.0.rc.1 throws stacktrace on rebuild or preview

Just upgraded to 1.0.0.rc.1 and now I get this stacktrace when running "bpm rebuild":

Fetching packages from remote...
Unfortunately, a fatal error has occurred. Please report this error to the BPM issue tracker at https://github.com/bpm/bpm/issues so that we can fix it. Thanks!
/Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `block in satisfied_by?': undefined method `call' for nil:NilClass (NoMethodError)
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `each'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `all?'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `satisfied_by?'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/source_index.rb:325:in `block in search'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/source_index.rb:323:in `select'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/source_index.rb:323:in `search'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/source_index.rb:280:in `find_name'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/installer.rb:214:in `installation_satisfies_dependency?'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/installer.rb:204:in `ensure_dependency'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/installer.rb:418:in `block in ensure_dependencies_met'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/installer.rb:417:in `each'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/installer.rb:417:in `ensure_dependencies_met'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems/installer.rb:136:in `install'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/libgems_ext/dependency_installer.rb:96:in `block (2 levels) in install'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/libgems_ext/dependency_installer.rb:66:in `each'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/libgems_ext/dependency_installer.rb:66:in `block in install'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/libgems-0.1.3/lib/libgems.rb:221:in `with_rubygems_compat'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/libgems_ext/dependency_installer.rb:54:in `install'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/remote.rb:83:in `block in install'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/libgems_ext/libgems.rb:43:in `with_silence'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/remote.rb:81:in `install'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/project.rb:621:in `core_fetch_dependency'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/project.rb:600:in `block in core_fetch_dependencies'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/project.rb:599:in `each'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/project.rb:599:in `core_fetch_dependencies'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/project.rb:278:in `fetch_dependencies'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/project.rb:179:in `verify_and_repair'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/project.rb:286:in `build'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/cli/base.rb:141:in `rebuild'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/lib/bpm/cli/base.rb:25:in `start'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.rc.1/bin/bpm:8:in `<top (required)>'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/bin/bpm:19:in `load'
    from /Users/steffen/.rvm/gems/ruby-1.9.2-p180/bin/bpm:19:in `<main>'

require of sproutcore-handlebars throwing a js error

I'm trying to get up and running with bpm and am getting issues whenever I try and require the sproutcore-handlebars package.

I've an example of what I'm doing at: https://github.com/crofty/example_bpm

The main.js file is very simple, it just requires all of sproutcore, however, when I do this the qunit tests dont run. If you look in the browser console the error is:

 Uncaught TypeError: Object #<Object> has no method 'template'

If I just require('sproutcore-runtime') then things work as expected and the tests pass. However, as soon as I also try and require('sproutcore-handlebars'), I get the same error.

You can see from the files which versions I'm using:
SC: 2.0.beta3
BPM: 1.0.0.beta13

Ability to use BPM as a proxy

Like the old Sproutcore build tools, BPM should have a way to proxy remote resources, so it can be used for Ajax requests without jsonp.

bpm/qunit should support loading MyApp/bpm_lib.js for testing

I've got a basic bpm setup for an application. I'm building all of the dependencies into bpm_lib.js.

I have MyProject/bpm_lib.js which includes all of my app code.

The default spade-qunit html includes only bpm_lib.js so when you do

http://localhost:4020/assets/spade-qunit/index.html?package=MyProject, it attempts to require(packageName) which should load the MyProject/bpm_lib.js code and then load the tests for that package.

Alternative solutions might be to generate a test.html and project.json that have testing configured.

Thoughts?

Port to node.js

When we first wrote BPM we decided to build off of RubyGems to help bootstrap. This saved us a lot of time and effort and was critical to getting BPM up and running. However, since the community is more interested in supporting JS code than Ruby code we're open to eventually porting the code to node.js. If anyone is interested in contributing to this effort, please respond here.

Circular dependency error when using require

I have seen this same error in JS files as well so it's not just CSS, but you can easily reproduce the error by cloning:

https://github.com/charlesjolley/WebIntents-Examples

Then try to run bpm rebuild:

Building static assets...
~ Using fetched package 'WebIntents' (0.1.0)
~ Building bpm_libs.js... (gzipped size: 8 Kb)
~ Building bpm_styles.css.../Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:150:in check_circular_dependency!': /Users/charles/Source/bpm/ports/WebIntents-Examples/css/reset.css has already been required (Sprockets::CircularDependencyError) from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:173:inbuild_dependencies_paths_and_assets'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:81:in to_a' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:191:inblock in build_dependencies_paths_and_assets'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:185:in each' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:185:inbuild_dependencies_paths_and_assets'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:81:in to_a' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:230:inblock in build_source'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/caching.rb:23:in cache_hash' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:226:inbuild_source'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.beta.12/lib/bpm/pipeline/generated_asset.rb:76:in build_source' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/sprockets-2.0.0.beta.12/lib/sprockets/bundled_asset.rb:93:into_s'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.beta.12/lib/bpm/project.rb:277:in block (2 levels) in build' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.beta.12/lib/bpm/project.rb:277:inopen'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.beta.12/lib/bpm/project.rb:277:in block in build' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.beta.12/lib/bpm/project.rb:267:ineach'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.beta.12/lib/bpm/project.rb:267:in build' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.beta.12/lib/bpm/cli/base.rb:137:inrebuild'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/task.rb:22:in run' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/invocation.rb:118:ininvoke_task'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor.rb:263:in dispatch' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/thor-0.14.6/lib/thor/base.rb:389:instart'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/gems/bpm-1.0.0.beta.12/bin/bpm:7:in <top (required)>' from /Users/charles/.rvm/gems/ruby-1.9.2-p180/bin/bpm:19:inload'
from /Users/charles/.rvm/gems/ruby-1.9.2-p180/bin/bpm:19:in `

'

`bpm yank` Fails in RC 3

> bpm yank
"yank" was called incorrectly. Call as "bpm yank".

Providing a -v/--version argument doesn't change it's behaviour.

BPM Beta 12: Error fetching SproutCore Touch

I'm fetching sproutcore-touch via BPM and get this error:

luis@Q:demogram2 $ bpm fetch sproutcore-touch --pre
/Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.0.5/lib/libgems/specification.rb:289:in load': uninitialized constant Psych::Syck (NameError) from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.0.5/lib/libgems/specification.rb:289:in_load'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.0.5/lib/libgems/spec_fetcher.rb:133:in load' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.0.5/lib/libgems/spec_fetcher.rb:133:infetch_spec'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.0.5/lib/libgems/spec_fetcher.rb:87:in block in fetch_with_errors' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.0.5/lib/libgems/spec_fetcher.rb:86:inmap'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.0.5/lib/libgems/spec_fetcher.rb:86:in fetch_with_errors' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/libgems_ext/dependency_installer.rb:129:infind_gems_with_sources'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/libgems_ext/dependency_installer.rb:36:in find_spec_by_name_and_version' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/libgems_ext/dependency_installer.rb:56:inblock in install'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.0.5/lib/libgems.rb:194:in with_rubygems_compat' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/libgems_ext/dependency_installer.rb:54:ininstall'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/remote.rb:83:in block in install' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/libgems_ext/libgems.rb:43:inwith_silence'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/remote.rb:81:in install' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/cli/base.rb:41:inblock in fetch'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/cli/base.rb:40:in each' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/lib/bpm/cli/base.rb:40:infetch'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:in run' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:118:ininvoke_task'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor.rb:263:in dispatch' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/base.rb:389:instart'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.12/bin/bpm:7:in <top (required)>' from /Users/luis/.rvm/gems/ruby-1.9.2-p290/bin/bpm:19:inload'
from /Users/luis/.rvm/gems/ruby-1.9.2-p290/bin/bpm:19:in `

'

bpm vendor

It would be nice to have a command that vendors all required dependencies.

"ReferenceError: Can't find variable: spade"

I'm following the tut for SC2 (https://github.com/bpm/bpm/wiki/Using-BPM-with-SproutCore-2.0). I've got BPM 1.0rc1 + SC 2.0b3 and I'm getting the "ReferenceError: Can't find variable: spade" in safari web inspector.
I've notice in my json file:
{
"name": "hello_world",
"bpm": "1.0.0",
"version": "0.0.1",
"bpm:build": {
"bpm_libs.js": {
"files": [
"lib", "templates"
],
"minifier": "uglify-js"
},
"bpm_styles.css": {
"files": [
"css"
]
}
},
"dependencies": {
"sproutcore": ">= 0.pre",
"spade": ">= 0"
}
}

Under the bpm_libs.js file it has "files" rather than "directories" like in the tut. The "files" was there after a fresh project was created in BPM. Otherwise, all my other files are from a fresh project and ONLY the alterations/additions that the tut shows. From my testing, it is that when "templates" is added to the json file, that is when my main.js becomes unresponsive and I then get the error listed in the title.

BPM Preview should have option to serve application JS from original source folder

IDE's like RubyMine/WebStorm/InteliJ or Aptana support integrated debugging (including setting breakpoints and watching variables). For this to work, the IDE allows the developer to map the project's source folder(s) to the corresponding URL on the server.

eg.

MyProject/lib/main.js === MAPS TO ===> http://localhost:4010/lib/main.js

While, for production purposes, it's good that BPM aggregates all the necessary files into a single bpm_libs.js file, this breaks debugging on these IDEs not to mention that it makes more "traditional" debugging on the browser's JS console a bit cumbersome as the developer would need to "mentally" map the code they see in the JS console/debugger with the source files on the project anyway.

It is therefore beneficial and productive for BPM's preview server to support serving up the scripts from the original location, such as the /lib directory.

There may be other alternatives, but I'll leave it to the team to decide the best approach.

`bpm preview` freezes

I'm rather frequently having to restart the BPM preview server while running SC2 tests.

Ctrl-C doesn't even work. I have to Ctrl-Z and then kill -9 it.

HTML5 Manifest Support

BPM needs to automatically emit a HTML5 manifest when possible. To do this we need some way to catalog all of the relevant assets and make sure they show up.

bpm init should respect the given name

When using bpm init to create a new project, dashes (-) are converted to underscores (_). This is annoying, but even worse, the output does not indicate that it has been changed; meaning it might take you awhile of poking around a heavily-populated directory to figure out where your new project is.

bpm on windows chokes trying to run gzip?

~ Building Myapp/bpm_tests.js...Unfortunately, a fatal error has occurred. Please report this error to the BPM issue trac
ker at https://github.com/bpm/bpm/issues so that we can fix it. Thanks!
C:/Ruby192/lib/ruby/gems/1.9.1/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:312:in ``': No such file or directory - gzip -c C:/
SimpliFi-HTML/assets/Simplifi/bpm_tests.js (Errno::ENOENT)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:312:inblock in build' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:300:in each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:300:in`build'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bpm-1.0.0.beta.14/lib/bpm/cli/base.rb:129:in `rebuild'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in`run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in`dispatch'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/bpm-1.0.0.beta.14/bin/bpm:8:in`<top (required)>'
from C:/Ruby192/bin/bpm:19:in `load'
from C:/Ruby192/bin/bpm:19:in`

'

bpm rc1 on windows still challenged

I removed all gems, ~/.bpm

git clone https://github.com/bpm/bpm.git
gem build bpm.gemspec
gem install bpm

bpm init mytest6

after failing repeatedly with

C:/Users/Jeff/AppData/Local/Temp/execjs20110909-3360-18j97lt.js(6,5) : error JS1135: Variable 'result' has not been declared
C:/Users/Jeff/AppData/Local/Temp/execjs20110909-3360-18j97lt.js(11,15) : error JS1135: Variable 'JSON' has not been declared

I altered execjs to emit the javascript.

Results in

https://gist.github.com/1206225

bpm add sproutcore-datastore throws error

Adding other packages seem to work fine.

Bad sproutcore-datastore format?

Trace is here

schilling-mbpro-3:myapp jschilli $ bpm add sproutcore-datastore --pre
Fetching packages from remote...
~ Fetched spade (1.0.1) from remote
Unfortunately, a fatal error has occurred. Please report this error to the BPM issue tracker at https://github.com/bpm/bpm/issues so that we can fix it. Thanks!
/Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.1.2/lib/libgems/specification.rb:289:in load': undefined class/module Syck::DefaultKey (ArgumentError) from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.1.2/lib/libgems/specification.rb:289:in_load'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.1.2/lib/libgems/spec_fetcher.rb:133:in load' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.1.2/lib/libgems/spec_fetcher.rb:133:infetch_spec'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.1.2/lib/libgems/spec_fetcher.rb:87:in block in fetch_with_errors' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.1.2/lib/libgems/spec_fetcher.rb:86:inmap'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.1.2/lib/libgems/spec_fetcher.rb:86:in fetch_with_errors' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/libgems_ext/dependency_installer.rb:129:infind_gems_with_sources'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/libgems_ext/dependency_installer.rb:36:in find_spec_by_name_and_version' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/libgems_ext/dependency_installer.rb:56:inblock in install'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/libgems-0.1.2/lib/libgems.rb:194:in with_rubygems_compat' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/libgems_ext/dependency_installer.rb:54:ininstall'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/remote.rb:83:in block in install' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/libgems_ext/libgems.rb:43:inwith_silence'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/remote.rb:81:in install' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:620:incore_fetch_dependency'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:599:in block in core_fetch_dependencies' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:598:ineach'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:598:in core_fetch_dependencies' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/project.rb:216:inadd_dependencies'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/lib/bpm/cli/base.rb:93:in add' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/task.rb:22:inrun'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/invocation.rb:118:in invoke_task' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor.rb:263:indispatch'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/thor-0.14.6/lib/thor/base.rb:389:in start' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.14/bin/bpm:8:in<top (required)>'
from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/bin/bpm:19:in load' from /Volumes/stendo/Users/jschilli/.rvm/gems/ruby-1.9.2-p290/bin/bpm:19:in

'

SystemStackError error on Ubuntu Options

I've installed ruby 1.9.2 P290 and get this error when running bpm.

vibul@ubuntu:~/Downloads/ruby-1.9.2-p290$ bpm init my_app
/usr/lib/ruby/1.9.2-p290/yaml.rb:30: warning: already initialized constant ENGINE
/usr/lib/ruby/1.9.2-p290/yaml.rb:36: warning: already initialized constant ENGINE
/usr/lib/ruby/1.9.2-p290/yaml.rb:40: warning: already initialized constant ENGINE
/usr/lib/ruby/1.9.2-p290/yaml.rb:30: warning: already initialized constant ENGINE
/usr/lib/ruby/1.9.2-p290/yaml.rb:36: warning: already initialized constant ENGINE
/usr/lib/ruby/1.9.2-p290/yaml.rb:40: warning: already initialized constant ENGINE
/usr/lib/ruby/1.9.2-p290/date.rb:236: warning: already initialized constant MONTHNAMES
/usr/lib/ruby/1.9.2-p290/date.rb:242: warning: already initialized constant DAYNAMES
/usr/lib/ruby/1.9.2-p290/date.rb:245: warning: already initialized constant ABBR_MONTHNAMES
/usr/lib/ruby/1.9.2-p290/date.rb:249: warning: already initialized constant ABBR_DAYNAMES
/usr/bin/bpm:19: stack level too deep (SystemStackError)

Peter suggested I raise an issue here in the hope and someone with ubuntu and ruby experience can lend a hand

Thanks
Veebs

`block in satisfied_by?': undefined method `call' for nil:NilClass

Hey guys,

Adding sproutcore to a fresh project does not work for me.



bar:/tmp/ $ cd hello_world
bar:hello_world/ $ bpm add --pre sproutcore
You must specify at least one package
bar:hello_world/ $ bpm add sproutcore --pre
Fetching packages from remote...
Unfortunately, a fatal error has occurred. Please report this error to the BPM issue tracker at https://github.com/bpm/bpm/issues so that we can fix it. Thanks!
/home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `block in satisfied_by?': undefined method `call' for nil:NilClass (NoMethodError)
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `each'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `all?'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/requirement.rb:145:in `satisfied_by?'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/source_index.rb:325:in `block in search'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/source_index.rb:323:in `select'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/source_index.rb:323:in `search'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/source_index.rb:280:in `find_name'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/installer.rb:214:in `installation_satisfies_dependency?'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/installer.rb:204:in `ensure_dependency'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/installer.rb:418:in `block in ensure_dependencies_met'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/installer.rb:417:in `each'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/installer.rb:417:in `ensure_dependencies_met'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems/installer.rb:136:in `install'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/libgems_ext/dependency_installer.rb:96:in `block (2 levels) in install'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/libgems_ext/dependency_installer.rb:66:in `each'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/libgems_ext/dependency_installer.rb:66:in `block in install'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/libgems-0.1.3/lib/libgems.rb:221:in `with_rubygems_compat'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/libgems_ext/dependency_installer.rb:54:in `install'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/remote.rb:83:in `block in install'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/libgems_ext/libgems.rb:43:in `with_silence'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/remote.rb:81:in `install'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/project.rb:621:in `core_fetch_dependency'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/project.rb:600:in `block in core_fetch_dependencies'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/project.rb:599:in `each'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/project.rb:599:in `core_fetch_dependencies'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/project.rb:217:in `add_dependencies'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/cli/base.rb:105:in `add'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/lib/bpm/cli/base.rb:25:in `start'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/gems/bpm-1.0.0.rc.2/bin/bpm:8:in `'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/bin/bpm:19:in `load'
    from /home/foo/.rvm/gems/ruby-1.9.2-p136/bin/bpm:19:in `'

Need to be able to include different files in production vs debug mode

Take https://github.com/PaulKinlan/WebIntents as an example. He has a debug.js file in the src directory that should only be included when doing a build in debug mode. Currently this is not possible because you would define the build like this:

"bpm:build": {
   "bpm_libs.js": {
    "directories": ["src"],
    "modes": ["production"]
  }
}

Problem is - there is no way to make the debug.js file build separately. I propose we allow you to define multiple options for a a build target. We would merge the options based on the modes option. For example I could move the debug.js file from the src directory into a debug directory in this project and then define a build option like:

"bpm:build": {
   "bpm_libs.js": [
    {
       "directories": ["src"],
       "modes": ["production", "debug"]
    },
    {
        "directories": ["debug"],
        "modes": ["debug"]
    }]
}

When processing in debug mode, we would merge these options so we end up including both the src and debug directories in the build. In production mode builds, the bottom set of options would be ignored causing us to build src only.

There are other ways we could approach too but we do need to solve this somehow as having a debug and a production build of a project is a very common pattern in projects.

bpm init newfolder fails

Attempted:

bpm init newfolder

Result:

  • Receive message:

        create app
    
    Could not find "LICENSE" in any of your source paths. Your current source paths are: 
    ~/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.4/templates/init
    
  • app folder added filesystem, but bpm add sproutcore responds

    You do not appear to be inside of a bpm project
    

Ruby 1.8 Support

Currently libgems doesn't support Ruby 1.8. Seems like it should be possible.

bpm init existingfolder fails

Attempted:

bpm init existingfolder

Result:

  • Receive message:

    Could not find "project.json" in any of your source paths. Your current source paths are: 
    ~/.rvm/gems/ruby-1.9.2-p290/gems/bpm-1.0.0.beta.4/templates/init
    
  • No changes made to filesystem

BPM is breaking handlebars format support in SproutCore 2.0

Steps to reproduce:

bpm init hello_world
cd hello_world
bpm add sproutcore --pre  --version=2.0.0.beta.3
bpm add spade
touch lib/foo.handlebars
bpm rebuild

You will get a build error about spade is not defined. I did some investigation and there are actually two bugs here, each of which would be worked around but together make this problem impossible to solve without changing BPM:

Bug 1

When building the plugin asset for sproutcore-handlebars-format package, BPM is trying to wrap the format.js file in a spade.register() function event though sproutcore-handlebars-format does not depend on spade [but the app does]. It appears that the app's usage of spade is 'leaking' through to the plugin. Plugins should build only with the dependencies of the plugin package itself, disregarding the dependencies of the app.

Bug 2

In any event, the only reason this file is being built is because the sproutcore-handlebars-format package.json lists directories.lib == '.'. Actually we don't want this package to have a lib AT ALL. But if you remove this directive and then try to run bpm pack it will complain because there is no lib directory. As far as I can tell, there is currently no way to build a package with no lib directory. This should not be the case as some package - such as this one or maybe a CSS-only package - may not want to have a lib directory.

bpm preview does not expose settings to plugins correctly

Although bpm now calls build_source correctly, bpm does not pass/populate the settings hash correctly. (running master post #28 fix)

my project.json file has

 "bpm:build": {

    "bpm_libs.js": {
        "spade:format": "function",      
         "directories": [
            "lib",
            "templates"
         ]
    },

the code under bpm rebuild is correctly 'spaded' - when run under bpm preview it is not.

I'm looking at this, but wanted to capture the issue.

SASS/SCSS support

Need to add support for SASS/SCSS when processing CSS. Supposedly this requires a ruby plugin.

Uninstall command to clear local cache

When building and testing my own packages it would be handy to have an uninstall command to remove a specific bpm package from local cache. But maybe I'm just doing something wrong.

Check locally first, then remotely

Currently when trying to add a package, bpm checks remotely first (for dependencies I believe) then looks at the local packages. It should have the option to look locally first.

This would be useful if you have copies of a nightly branch of lets say sproutcore-statechart and Heroku/EC2 are down like they were tonight...

BPM Should accept both packages and projects in the vendor/ directory

Right now, you have to put projects in the vendor/ directory if you want to use them from source, and packages in the packages/ directory. I think that the distinction is an implementation detail and the user may not know whether something he's using is a package or a folder.

I talked to peterw and he said he can infer from the json whether it's a project or a directory, and we can combine both of them in the packages/ directory.

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.