-
Notifications
You must be signed in to change notification settings - Fork 103
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
stampit({options}) api #84
Conversation
stampit.methods, stampit.refs, stampit.init, stampit.props. Drop IE8 support. Reorganize tests, add some.
Exclude tests, travis, jshist, SauceLabs, etc. development files from NPM package.
Do you have a link to a reference where I can learn more about this? Is the latest
Probably a good idea. |
* @param {Object} [refs] A map of property names and values to be mixed into each new object. | ||
* @param {Function} [init] A closure (function) used to create private data and privileged methods. | ||
* @param {Object} [props] An object to be deeply cloned into each newly stamped object. | ||
* @param {Object} [options] Options to build stamp from: `{ methods, refs, init, props }` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should still be @param
annotations for each of:
options.methods
, options.refs
, options.init
, and options.props
.
I wonder if it's possible to define an options type with JSDoc without it assuming that there's an options
class?
Then you could define the type elsewhere and just do @param {options} [options] desc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a way. I'll see what I can do.
https://docs.npmjs.com/misc/scripts First bullet point. There's really no need to have dist/ in the repo, noone looks at it. It's just for compatibility. I do it the way @koresar describes for react-stampit. @koresar We should use the files: {
stampit.js,
mixer.js,
... other files to include
} |
require('./stampit-aliases'); | ||
require('./state'); | ||
require('./v1-compatibility'); | ||
require('require-all')(__dirname); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@troutowicz Thanks for the reference. I was unaware of this part:
I think that answers my question, so the dist build of stampit will be available if we add it as I ask because I'd love to convert Stampit source to ES6 and compile it, but we'll still need to support require in ES5 projects. =) |
Exactly. "main": "dist/stampit.js" I can help out with the ES6 conversion. I recently submitted a PR to @koresar's supermixer repo doing just that. I want to see all stampit projects using ES6! |
👍 Let's do that right after we land 2.0. =) |
My comments are just minor nitpicks. I'm OK with landing this.
Please feel free to merge any pending PRs necessary to land 2.0. I'm excited to share all your great contributions with the world. =) |
RE the |
@troutowicz I do not feel strong about |
Updated the JSDoc of |
…it({static})`. Add many JSDoc annotations to shortcut and factory methods. Update JSDoc to accompany README slightly better.
#74 got implemented as well (static stuff). Requires thorough review. @ericelliott ? |
Looks like Travis can't find lodash 3.9.1+ even though it's currently at 3.9.3. Am I reading that right? |
Correct. I have no idea why is that happening. I tried to use earlier lodash, but it fails with "Can't download package from the HTTPS uri". Might be an NPM issue (too old build). |
This looks good to me. I'm happy to merge it but maybe we should hold off on npm publish until we sort out why the travis build is failing? |
You can fixing it. :) Just put the following into the travis yaml. before_install
npm update npm -g |
Oh, cool! Can you do that in a new PR? This one is already merged. =) |
Btw, Travis-CI fixed their |
Nice. |
Please, review. List of changes:
stampit( options )
API.stampit.methods()
, etc. See Convenience methods stampit.state(), stampit.methods(), stampit.enclose() #41./dist/
is now not committed to the repo but build only on theprepublish
NPM hook./test/
, travis, jshist, SauceLabs, etc. development files from NPM package via.npmignore
.