Giter VIP home page Giter VIP logo

bag.js's Introduction

Forums / Blogs / Groups / ...

Build Status

Live demo: https://rcopen.com

Nodeca itself is not expected for wide use. It's intended to replace old RC Design forum software and make programmer's life more comfortable.

But during development we create a lot of useful and popular packages for node.js. See organizations of @puzrin profile. Everything we do is published on github. Enjoy!

bag.js's People

Contributors

dervus avatar kirill89 avatar rlidwka avatar timgates42 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bag.js's Issues

Namespacing

How can I load modules into namespaces for use in other modules?
For example, reuqire.js or curl.js does it like this:

requirejs(['jquery', 'canvas', 'app/sub'], function   ($, canvas, sub) {
    //jQuery, canvas and the app/sub module are loaded and can be used here now.

    return {
        helloWorld: function() {
          console.log('Hi there!');
        }
    };
});

The namespaces are then "$, canvas, sub", How can I achieve the same with bag.js? Thanks

Not working in IE11

Not working in IE11, getting Syntax error -

.then(data => {
console.log('loaded', data);
})

Syntax for css-js-loading

var bag = new window.Bag();
bag.require(['/site.css', '/jquery.js', '/site.js']);

is that corrrect for just loading files as with <script> .....*.js..... </script>

Which other loader do you propose ?

bag.js not working in IE8?

i am using the least bag.js (0.1.4), but ie8 gave me the following error:
Access is denied
bag.js
code:0

requiring js/css dynamically

Is it possible to load javascript dynamically via ajax/rpc? I should explain what I mean. I have an app that dynamically pulls ins new 'widgets' with their own scoped css and js code. These css and js snippets are stored in mongodb. I would like to be able to use bag.js to require them as needed and store them in local storage ( along with appending them to the appropriate widget element as script and style elements )

Does that make sense?

accessing functions defined in bag

I notice that any functions defined in bag.js startup are no longer accessible in the global name space, eg:

bag.require(['/site.css', '/jquery.js', '/site.js'], function (err) {
  if (err) {
    console.log('loading error: ', err);
    return
  }
  // code to run after loading
  function testFunction() {
               console.log('hello');
       }
})
.

How do I access these named functions as

window'testFunction'
no longer works?

lite-version

Do You think You can make a lite-version, which only loads css js etc. - no storage functions ?

Is there a SYNC way to bag.get ?

THIS IS THE ASYNC WAY

bag.get('dolorem', function(err, data) {
    if (err) {
      console.log('Loading error: ', err);
      return;
    }

    console.log('Loaded data:\n', data);
    }

Someone Like me, want to use the SYNC Way

let data = bag.get('dolorem');
console.log('Loaded data:\n', data);

Cannot load relative import in css.

For example, I have a style file like:

/* foo.css */
@import url(bar.css);

and I call bag.js as the following:

var bag = new window.Bag();
bag.require(["foo.css"]);

It will success load foo.css, but not load bar.css.

[question] Forcing replace of cached scripts

Hi,

I've started playing with your library and looks very useful.

I have a question about the possibility to be able to set (as ex) a file hash (like gulp-rev) and tell loader to retrieve the script from the server and replace the old one even is not expired.

Ore any other way to achieve that.

Thanks,
Paul

clearing all storage(websql and indexeddb)

Am I misunderstanding the purpose of bag.clear? I am able to remove individual keys by using bag.remove. However, bag.clear(true) does not remove all keys. Is this expected behavior?

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.