Skip to content
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

Decaffeinate & Webpack #69

Merged
merged 19 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

module.exports = {
recursive: true,
require: ['coffeescript/register', 'test/common.coffee'],
require: ['test/node.js'],
diff: true,
extension: ['js', 'coffee'],
extension: ['js'],
package: './package.json',
reporter: 'spec',
slow: 75,
timeout: 10000,
ui: 'bdd',
spec: ['test/yayson/**/*.coffee'],
'watch-files': ['src/**/*.coffee', 'test/**/*.coffee'],
spec: ['test/yayson/**/*.js'],
'watch-files': ['src/**/*.js', 'test/**/*.js'],
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10.15.0
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,24 @@ In JavaScript this would be done as:

```javascript

var Presenter = require('yayson')().Presenter;

class ItemsPresenter extends Presenter {};
ItemsPresenter.prototype.type = 'items'

ItemsPresenter.prototype.attributes = function() {
var attrs = Presenter.prototype.attributes.apply(this, arguments);
var Presenter = require('yayson')().Presenter;

attrs.start = moment.utc(attrs.start).toDate();
return attrs;
}
class ItemsPresenter extends Presenter {
attributes() {
var attrs = super.attributes(...arguments);
attrs.start = moment.utc(attrs.start).toDate();
return attrs;
}

ItemsPresenter.prototype.relationships = function() {
return {
event: EventsPresenter
relationships() {
return {
event: EventsPresenter
}
}
}
};
ItemsPresenter.prototype.type = 'items'


ItemsPresenter.render(item)
```
Expand Down
31 changes: 0 additions & 31 deletions bower.json

This file was deleted.

120 changes: 0 additions & 120 deletions coffeelint.json

This file was deleted.

43 changes: 0 additions & 43 deletions gulpfile.coffee

This file was deleted.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"name": "yayson",
"version": "2.1.0",
"description": "A library for serializing and reading JSON API standardized data in JavaScript.",
"main": "lib/yayson.js",
"main": "src/yayson.js",
"engines": {
"node": ">=10",
"npm": ">=6"
},
"scripts": {
"test": "mocha",
"build": "gulp",
"build": "webpack --config webpack.dist.js",
"test-browser": "webpack-dev-server --config webpack.browser.js",
"preversion": "npm test && npm run build && git add dist/yayson.js",
"postversion": "git push --follow-tags origin master",
"release": "npm version minor"
Expand Down Expand Up @@ -37,19 +38,18 @@
},
"homepage": "https://github.com/confetti/yayson",
"devDependencies": {
"bower": "^1.8.12",
"browserify": "^17.0.0",
"@babel/core": "^7.7.4",
"@babel/preset-env": "^7.7.4",
"babel-loader": "^8.0.6",
"chai": "^4.3.4",
"coffeeify": "^3.0.1",
"coffeescript": "^1.12.7",
"ecstatic": "^4.1.4",
"gulp": "^4.0.2",
"gulp-coffee": "^3.0.3",
"gulp-util": "^3.0.1",
"mocha": "^8.3.2",
"sinon": "^10.0.0",
"sinon-chai": "^3.6.0",
"vinyl-source-stream": "^2.0.0"
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0",
"webpack-merge": "^4.2.2"
},
"optionalDependencies": {
"lodash": "^4.17.21",
Expand Down
4 changes: 4 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
semi: false,
singleQuote: true
}
30 changes: 0 additions & 30 deletions src/yayson.coffee

This file was deleted.

Loading