Giter VIP home page Giter VIP logo

clipped's People

Contributors

codacy-badger avatar cristijora avatar greenkeeper[bot] avatar inizio 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

Watchers

 avatar  avatar  avatar  avatar  avatar

clipped's Issues

Attempt first element if no index provided in array

For example

const config = createChainable({
  abc: [
    {text: 'abc'}
  ]
})

If i do something like

config.abc.text

Since the array abc does not have text property, it should try accessing conffig.abc[0].text

This is useful tools that can have multiple sets of config e.g. rollup

Standard for making clips

  • Make a clip like a preset that exports the a async function returning config
  • Make a clip for making clips
  • Download from clip repo if detected that it is not in cache

ConfigTransform for cli

Description

Some tools like babel and typescript have additional functions in their cli, so its actually better to like create a config file rather than trying to recreate their cli behaviours using their api like @babel/core

Suggestions

  • Create a directory called .clipped for storing those config files
  • Do it like @vue/cli's ConfigTransform?

feat: Conditional property

when(clipped => clipped.mode === 'development', clipped => clipped.webpack.plugins.add('commonChunks'))

[email protected]

Proposal for 2.0 🤔

Objectives

0. Use unclip as new name

1. Use 'plugin' concept instead of existing 'preset'

Problem

Currently a preset cannot really be reused because they have app specific constants such as entry path, app name.

Solution

App specific options can be passed in .env file, plugins get options from function call

// plugin-blabla.js
module.exports = (opt) => ({config, on, env, tools}) => ({
  return {
    docker: {
      "HttpHeaders": {
        "MyHeader": opt.header
      }
    }
  }
})

// clipped.config.js
module.exports = () => [
  require('@clipped/plugin-blabla')({header: 'someheader'})
]

2. Make config changes more convenient.

Problem

Current way needs a really long object chain before even reaching the config.

Current way:

module.exports = clipped => {
  clipped.config.webpack.plugins.push(/* blablabla */)
}

Solution

Correspond export's object keys to correspond to config, and mutation will be similar to immer's behaviour

New way:

// base.js
module.exports = () => () => ({
  webpack: {
    entry: [],
    rules: {}
  }
})

// clipped.config.js
module.exports = () => () => {
  return {
    webpack: config => plugins.push(/* blablabla */)
  }
}

3. Make result config more verbose

Problem:

Currently when user edit a preset he actually does not know how the final config object is like.

Solution:

Maybe stream to console / json file?

4. Better way to express config relations

Problem

For instance the way rollup use babel config and that of webpack is 99% similar but not same

Solution

https://github.com/clippedjs/jointed/issues/24

5. Revamp event emitter and generator

Problem

Current init does not work anymore because didn't scan nested folder structure on github

Solution

Make create a reserved command, which lets user choose plugins to install first, and then use init command which is currently used for running yeoman generator, make it empty instead initially

6. Replace flow with typescript

Progress

  • Use unclip as new name
  • Rewrite presets as plugins
  • describe function to describe preset (to be done in next release)
  • transform function to copy config from e.g. .babelrc (to be done in next release)
  • Support (opt) => [(clipped) => {}] besides (clipped) => {} for clipped and the plugins
  • Support using return value of plugin to modify config
  • Report resulting config to user
  • Use aliasing for config relationships
  • Add reservedcreate hook in cli
  • Replace flow with typescript
  • Add XO linting
  • Use AVA instead of mocha for testing

StandardJS

Currently StandardJs reports error on custom flowtype, might be due to wrong setup.

Queue config mutation

Description

Right now a problem is that config often depends on the hook triggered and options passed, but right now api.config is immediately mutated

Suggestions

  • Use chain as a function so the mutation function can be queued, and executed on hook call instead of immediately

Power up CLI

Description

Currently CLI is getting a bit bloaty due to added hooks, and is not clearly separated in terms of initializing clipped.

Think might be better to move it to separate package @clipped/cli like @babel/cli

Maybe do it before cac migration

And I think it will be awesome if when some cases can be automated for users.

Examples:

  • When user installed React and then runs clipped dev, cli can assume behaviour like create-react-app. So install webpack, babel and react plugin and then run the dev hook
  • If detect index.html in src, automatically use it as template in html-webpack-plugin

Possible issues:

  • How do I know if user want to use Webpack or Rollup?
  • How to cleanly revert if, e.g. user uninstalls React and install Vue

Suggestions

An in-range update of codacy-coverage is breaking the build 🚨

The devDependency codacy-coverage was updated from 3.0.0 to 3.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

codacy-coverage is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 14 commits.

  • bd4742f Release version 3.1.0
  • b9cac41 Merge pull request #67 from codacy/mrfyda-patch-1
  • 7b995cd Add GitLab CI commit env variable
  • 2b39b7f Merge pull request #66 from codacy/IGFCoimbra-patch-1
  • b4c8786 Add available options
  • 83eb16c Release version 3.0.1
  • 56316e7 Update package-lock.json for npm 5.10.0
  • f511ac4 Merge pull request #65 from codacy/update-package-lock
  • 9a73660 Update package-lock.json
  • ae0a7ec Merge pull request #64 from mrfyda/master
  • 07b31bb Update vulnerable packages
  • 49561f6 Update README.md
  • e5be8b8 Don't depend on jest exit code
  • 149e9c2 Add Windows command notes to README

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of lerna is breaking the build 🚨

Version 3.3.1 of lerna was just published.

Branch Build failing 🚨
Dependency lerna
Current Version 3.3.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

lerna is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes v3.3.1

Bug Fixes

  • create: Upgrade whatwg-url to ^7.0.0 (00842d6)
  • import: Handle filepaths with spaces more robustly (#1655) (b084293)
  • prompt: Upgrade inquirer to ^6.2.0 (ebb7ee4)
  • publish: Tell yarn to stop creating git tags (2a6f0a4), closes #1662
  • run-lifecycle: Remove repetitive error logging (b8915e7)
Commits

The new version differs by 13 commits.

  • 5da1319 chore(release): publish v3.3.1
  • 367bf4e test(integration): Avoid inexplicable snapshot comparison errors on Windows
  • 5880788 test(helpers): Replace normalize-test-root with augmented placeholder serialization
  • ed16536 test(helpers): Make serialize-tempdir placeholder consistent with normalize-test-root
  • 00842d6 fix(create): Upgrade whatwg-url to ^7.0.0
  • ebb7ee4 fix(prompt): Upgrade inquirer to ^6.2.0
  • b8d11b8 chore(deps): Update eslint + jest
  • 7bd3179 chore: flailing around trying avoid 'no visual difference' snapshot garbage on Windows
  • b8915e7 fix(run-lifecycle): Remove repetitive error logging
  • a379266 chore(helpers): Normalize newlines to coddle windows
  • 2a6f0a4 fix(publish): Tell yarn to stop creating git tags
  • ac0baa7 test(integration): avoid quoting arguments to coddle windows
  • b084293 fix(import): Handle filepaths with spaces more robustly (#1655)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Describe plugin

Description

module.exports = () => [
  api => api.describe({
    id: 'org.clipped.webpack',
    name: 'Webpack plugin'
    description: 'Webpack bundler support',
    after: ['org.clipped.babel'],
    before: ['org.clipped.typescript']
  })
]

Suggestions

Codecov unable to analyse coverage report

What was your expectation?

Codecov to analyse the report on website

What is the actual behaviour?

The report was successfully uploaded, but on the website Codecov said error

Suggested changes

No clue yet

Version 10 of node.js has been released

Version 10 of Node.js (code name Dubnium) has been released! 🎊

To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:

  • Added the new Node.js version to your .travis.yml

If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.

More information on this issue

Greenkeeper has checked the engines key in any package.json file, the .nvmrc file, and the .travis.yml file, if present.

  • engines was only updated if it defined a single version, not a range.
  • .nvmrc was updated to Node.js 10
  • .travis.yml was only changed if there was a root-level node_js that didn’t already include Node.js 10, such as node or lts/*. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.

For many simpler .travis.yml configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖


FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Support yarn create

Description

Currently need to install clipped globally and then clipped create

Suggestions

  • Make a create-clipped package that runs clipped create
  • Make it so clipped create <folder-name> creates folder and go into it
  • In package.json add npm scripts according to hooks

feat: Reflection config

Description

Currently it is hard to support a standard config cross build tools

Suggestions

Need a way to reflect e.g. clipped.config.name to clipped.config.webpack.plugins .html.args[0].title which is clumsy and hard to remember

Issue using clipped on Windows 10 box

Description

Installs, but when tying t use create or init, it errors.

λ clipped create
module.js:550
    throw err;
    ^

Error: Cannot find module '../dist/src'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (C:\Users\Mark\AppData\Roaming\npm\node_modules\clipped\bin\clipped:3:1)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

Using node 8.12 and npm 6.4.1

Suggestions

More straightforward CLI?

Description

After trials it actually seems like having separate plugins instead of templates is better, but then how to guide users who are used to create-react-app or @vue/cli to use it is a problem, because it is possible they don't even know what is the difference between Webpack and Rollup, and why need to setup Babel separately.

Suggestions

  • Make create hook more like a survey like 'Do you want to build a library or website' -> 'Do you want to use react / vue / angular' -> 'Do you want to use typescript' ?

  • Or make recipes on documentation like parceljs's

bug: Dev server not hot reloadng the page

What was your expectation?

The project to be re-transpiled and active page hot-reloaded

What is the actual behaviour?

It was re-transpiled but needs to reload the page to take effect

Suggested changes

  • Might be problem with dev-server options

`create` fails on Window

C:\source
λ npm i -g [email protected]
C:\Users\Mark\AppData\Roaming\npm\clipped -> C:\Users\Mark\AppData\Roaming\npm\node_modules\clipped\bin\clipped
+ [email protected]
updated 1 package in 15.395s

then:

C:\source
λ cd clipTest\

C:\source\clipTest
λ clipped init

Usage:    clipped ACTION

Actions:
version, create, config:watch


C:\source\clipTest
λ clipped create
{ Error: spawn npm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:362:16)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn npm',
  path: 'npm',
  spawnargs: [ 'init' ] }

C:\source\clipTest
λ ls

C:\source\clipTest
λ clipped

Usage:    clipped ACTION

Actions:
version, create, config:watch


C:\source\clipTest
λ clipped create
{ Error: spawn npm ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:362:16)
    at _combinedTickCallback (internal/process/next_tick.js:139:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
  errno: 'ENOENT',
  code: 'ENOENT',
  syscall: 'spawn npm',
  path: 'npm',
  spawnargs: [ 'init' ] }

C:\source\clipTest
λ clipped version
2.1.4

Originally posted by @devtech8 in #118 (comment)

Decouple clips from actions

Make the scripts run from the clips rather than target directory, then pass the target directory path into it as src and dist path

Checklist:

  • Make actions use npm scripts rather than calling node_modules bin
  • Make webpack for frontend work with change in src and dist path
  • Use backpack for backend, referring to frontend
  • Abstract getting clips into a utility function for possible future extensions (e.g. github, npm package)

An in-range update of lerna is breaking the build 🚨

The devDependency lerna was updated from 3.3.2 to 3.4.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lerna is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes for v3.4.0

Features

  • publish: Use APIs for validation queries instead of CLI (65fc603)

We now use libnpmaccess and npm-registry-fetch to validate logged-in status and package permissions. Huge thanks to @zkat for extracting these fabulous packages!

Commits

The new version differs by 5 commits.

  • cd5a8fa chore(release): publish v3.4.0
  • 65fc603 feat(publish): Use APIs for validation queries instead of CLI
  • 21aa430 chore(map-to-registry): Ensure env does not pollute config resolution
  • ea41470 chore: Remove beta-quality Azure Pipelines
  • fd62753 chore(ci): Set core.autoCRLF -> true so Windows stops failing lint

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.