Skip to content
Permalink
Browse files

Compile the code via buble via a custom release script

  • Loading branch information...
KidkArolis committed Mar 8, 2018
1 parent 0dffe8a commit a81ac2dc0a887e894f7608bcafbff786de50d27b
@@ -1,4 +1,5 @@
node_modules
.DS_Store
.nyc_output
node_modules
coverage
.DS_Store
dist
@@ -1,5 +1,5 @@
const createAtom = require('../..')
const log = require('../../log')
const createAtom = require('tiny-atom')
const log = require('tiny-atom/log')

const atom = createAtom({ count: 0 }, evolve, render, { debug: log })

@@ -26,12 +26,15 @@ function render (atom) {
}

atom.split({ count: 5 })
// -> { count: 5 }
// -> { count: 5 }

atom.split('increment', 5)
// -> { count: 10 }
// -> { count: 10 }

atom.split('asyncIncrement', 3)
// -> { count: 10, loading: true }
// -> { count: 10, loading: true }

atom.split('increment', 2)
// -> { count: 12, loading: true }
// -> 1 second later...
// -> { count: 15, loading: false }
// -> { count: 12, loading: true }
// -> 1 second later...
// -> { count: 15, loading: false }
@@ -0,0 +1,11 @@
const path = require('path')

module.exports = {
webpack: (config) => {
config.resolve = {
alias: {
'tiny-atom': path.join(__dirname, '..', '..', 'src')
}
}
}
}
@@ -7,8 +7,5 @@
"start": "../../node_modules/.bin/jetpack ."
},
"dependencies": {},
"devDependencies": {},
"jetpack": {
"jsx": "Preact.h"
}
"devDependencies": {}
}
@@ -1,8 +1,8 @@
const Preact = require('preact')
const createAtom = require('../..')
const { ProvideAtom, ConnectAtom } = require('../../preact')
const devtools = require('../../devtools')
const log = require('../../log')
const createAtom = require('tiny-atom')
const { ProvideAtom, ConnectAtom } = require('tiny-atom/preact')
const devtools = require('tiny-atom/devtools')
const log = require('tiny-atom/log')

const atom = window.atom = createAtom({ count: 0 }, evolve, render, {
debug: (info) => {
@@ -0,0 +1,12 @@
const path = require('path')

module.exports = {
jsx: 'Preact.h',
webpack: (config) => {
config.resolve = {
alias: {
'tiny-atom': path.join(__dirname, '..', '..', 'src')
}
}
}
}
@@ -8,8 +8,5 @@
},
"dependencies": {
"preact": "^8.2.6"
},
"jetpack": {
"jsx": "Preact.h"
}
}
@@ -0,0 +1,49 @@
Arguments:
/usr/local/Cellar/node/8.9.0/bin/node /Users/karolis/.yarn/bin/yarn.js remove standard5

PATH:
/Users/karolis/.local/bin/luna-studio:/Users/karolis/.rbenv/shims:/Users/karolis/gcloud/bin:/Users/karolis/.yarn/bin:./node_modules/.bin:~/bin:/usr/local/bin:/usr/local/sbin:/Users/karolis/Library/Python/3.6/bin/:/Users/karolis/.nvm/versions/node/v8.9.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Yarn version:
1.6.0-20180306.0439

Node version:
8.9.0

Platform:
darwin x64

npm manifest:
{
"name": "preact-example",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"start": "../../node_modules/.bin/jetpack ."
},
"dependencies": {
"preact": "^8.2.6"
}
}

yarn manifest:
No manifest

Lockfile:
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


preact@^8.2.6:
version "8.2.6"
resolved "https://registry.yarnpkg.com/preact/-/preact-8.2.6.tgz#0028b426ef98fcca741a3c617ff5b813b9a947c7"

Trace:
Error: This module isn't specified in a manifest.
at new MessageError (/Users/karolis/.yarn/lib/cli.js:186:110)
at Object.<anonymous> (/Users/karolis/.yarn/lib/cli.js:60502:15)
at Generator.next (<anonymous>)
at step (/Users/karolis/.yarn/lib/cli.js:98:30)
at /Users/karolis/.yarn/lib/cli.js:109:13
at <anonymous>
@@ -1,9 +1,9 @@
const React = require('react')
const ReactDOM = require('react-dom')
const createAtom = require('../..')
const { ProvideAtom, ConnectAtom } = require('../../react')
const devtools = require('../../devtools')
const log = require('../../log')
const createAtom = require('tiny-atom')
const { ProvideAtom, ConnectAtom } = require('tiny-atom/react')
const devtools = require('tiny-atom/devtools')
const log = require('tiny-atom/log')

const atom = window.atom = createAtom({ count: 0 }, evolve, render, {
debug: (info) => {
@@ -87,7 +87,7 @@ function render (atom) {
<ProvideAtom atom={atom}>
<App />
</ProvideAtom>
), document.body)
), document.getElementById('root'))
}

render(atom)
@@ -0,0 +1,12 @@
const path = require('path')

module.exports = {
jsx: 'React.createElement',
webpack: (config) => {
config.resolve = {
alias: {
'tiny-atom': path.join(__dirname, '..', '..', 'src')
}
}
}
}
@@ -9,8 +9,5 @@
"dependencies": {
"react": "^16.1.0",
"react-dom": "^16.1.0"
},
"jetpack": {
"jsx": "React.createElement"
}
}
@@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"coverage": "nyc --reporter html ava",
"test": "standard && standard5 && nyc ava"
"test": "standard && nyc ava",
"release": "node ./tasks/release"
},
"contributors": [
"Karolis Narkevicius <karolis@qubit.com>",
@@ -14,34 +15,20 @@
"license": "ISC",
"devDependencies": {
"ava": "^0.25.0",
"buble": "^0.19.3",
"execa": "^0.9.0",
"jetpack": "^0.7.3",
"jsdom": "^11.3.0",
"np": "^2.16.1",
"nyc": "^11.3.0",
"preact": "^8.2.6",
"react": "^16.1.0",
"react-dom": "^16.1.0",
"standard": "^9.0.0",
"standard5": "^2.0.0"
"standard": "^11.0.0"
},
"standard": {
"ignore": [
"docs/public"
],
"global": [
"suite",
"test"
]
},
"standard5": {
"ignore": [
"docs",
"examples",
"test"
],
"global": [
"suite",
"test"
]
},
"ava": {

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -1,12 +1,11 @@
module.exports = function dev (info) {
var type = info.type
var atom = info.atom
var action = info.action
var sourceActions = info.sourceActions
var ext = atom.devtools
const type = info.type
const atom = info.atom
const sourceActions = info.sourceActions
const ext = atom.devtools

if (!ext) {
var devExt = window.devToolsExtension || window.top.devToolsExtension
const devExt = window.devToolsExtension || window.top.devToolsExtension
if (!devExt) {
console.log('No devtools extension found')
atom.devtools = {}
@@ -31,9 +30,9 @@ module.exports = function dev (info) {

// send only updates into devtools, not actions
if (type === 'update') {
action = sourceActions.length ? sourceActions[sourceActions.length - 1] : { type: '--', payload: action.payload }
var updatedKeys = (!action.seq ? ' ' + ellipsis(Object.keys(action.payload || {}).join(', '), 10) : '')
var devtoolsAction = {
const action = sourceActions.length ? sourceActions[sourceActions.length - 1] : { type: '--', payload: info.action.payload }
const updatedKeys = (!action.seq ? ' ' + ellipsis(Object.keys(action.payload || {}).join(', '), 10) : '')
const devtoolsAction = {
seq: action.seq,
sourceActions: sourceActions,
type: '(' + (action.seq || '-') + ') ' + action.type + updatedKeys,
Oops, something went wrong.

0 comments on commit a81ac2d

Please sign in to comment.
You can’t perform that action at this time.