Git Product home page Git Product logo

lass's People

Contributors

0xflotus avatar 3imed-jaberi avatar brianchung808 avatar khriztianmoreno avatar niftylettuce avatar omgimalexis avatar pablopunk avatar shaunwarman avatar spence-s avatar titanism 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lass's Issues

Error on first usage: Cannot read config file

Hi, I have an error after trying to create a project with lass new-package:

Error: Cannot read config file: /Users/vedmant/Projects/_My/test/new-package/node_modules/eslint-config-prettier/standard.js
Error: "prettier/standard" has been merged into "prettier" in eslint-config-prettier 8.0.0. See: https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md#version-800-2021-02-21
Referenced from: BaseConfig
    at Object.<anonymous> (/Users/vedmant/Projects/_My/test/new-package/node_modules/eslint-config-prettier/standard.js:1:7)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at module.exports (/Users/vedmant/Projects/_My/test/new-package/node_modules/import-fresh/index.js:32:59)
    at loadJSConfigFile (/Users/vedmant/Projects/_My/test/new-package/node_modules/@eslint/eslintrc/lib/config-array-factory.js:225:16)
    at loadConfigFile (/Users/vedmant/Projects/_My/test/new-package/node_modules/@eslint/eslintrc/lib/config-array-factory.js:309:20)
    at ConfigArrayFactory._loadConfigData (/Users/vedmant/Projects/_My/test/new-package/node_modules/@eslint/eslintrc/lib/config-array-factory.js:609:42)
(node:6492) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: ./node_modules/.bin/xo --fix
    at makeError (/Users/vedmant/.config/yarn/global/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Users/vedmant/.config/yarn/global/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async post (/Users/vedmant/.config/yarn/global/node_modules/lass/sao.js:222:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:6492) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:6492) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Macos: 11.4 (20F71)

node -v
v14.16.0
yarn -v
1.22.4

Add initial git commit

Add an initial git commit to the project with a commit message like Initial commit from Lass

I think it allows more flexibility for a dev to want to change or squash their initial commit/changes without having to go through a bunch of steps. Plus it brands Lass a little more. I think it's still pretty clean in git history.

Thoughts?

Add "Do you want to target the browser too?" (if and only if babel option was checked)

Directly builds on top of work that will need to be first completed per #40 first

Scoped packaged not using the correct name

Since the string passed to lass starts with @ it should prompt to use @ladjs/email as the package name not just the directory name.

➜  code lass @ladjs/email
> Generating package in /Users/xo/code/@ladjs/email
? What is the name of the new package (email)

Add "Do you want to use Babel to compile your project?" flag

if the user selects yes for this option in the CLI, then the following needs to happen:

Allow --no-verify to be passed to husky

Currently if you want to do an initial commit without 100% coverage husky will throw an error.
If we could pass --no-verify somehow it'd allow a first commit without the need to write every test right at the start.

heavy / slow template

@niftylettuce I really like your tool because it exposed me to new packages!

That said, I feel that it goes against one of the core principles of build processes. If a developer commits 4000 times in a year, every second spent waiting for the commit to go thru equates to a wasted hour. If committing runs a slew of different processes and takes 20 seconds, I might have spent 20+ hours by the end of the year waiting for my code to commit. On team and company scales, that's a lot of wasted time & resources.

The nice thing about working in interpreted languages like JS is that you can avoid compilation and building. Linting is really fast, and it's widely accepted. And adding a hook for unit testing makes a lot of sense, because your IDE is going to miss certain types of errors in your code, and committing broken code is expensive.

In practice, I've found that using lass has generated pedantic errors and warnings during committing - XO and the default settings are very strict, perfectly valid JS is treated as an error. And when things do work, loading up the various steps of the githook process takes 6+ seconds for a simple project, and much longer for project with 50,000 LOC.

Just wanted to share my thoughts! I think there are benefits to doing things the way you're doing them, but I'm not sure I can rely on a tool like lass.

Github username shouldn't be lowercased

Hey,
loving lass, so I'm adding a few suggestions here, hopefully following up with PRs later :)

So, my github name is mixed case and when lass lowercases it, the link to travis will be broken because they treat their URLs case sensitive.

Minor issue.

UnhandledPromiseRejectionWarning

(node:3252) UnhandledPromiseRejectionWarning: Error: Line: 4 Column: 60 - Unexpected identifier
    at Object.exports.parse (/Users/user/Projects/lass/node_modules/alce/lib/alce.js:20:11)
    at module.exports (/Users/user/Projects/lass/node_modules/fixpack/fixpack.js:49:19)
    at post (/Users/user/Projects/lass/sao.js:195:5)
    at kopy.then.stream (/Users/user/Projects/lass/node_modules/sao/lib/generate.js:226:40)

Core bug in new release with xo

@3imed-jaberi hey, there is a core bug here with your changes to xo:

❯ yarn test
yarn run v1.22.4
$ yarn run lint
$ yarn run lint:js && yarn run lint:md
$ xo --extend xo-lass --prettier --space

  test/test.js:6:1
  ✖   6:1  Replace ↹ with ··                                                                    prettier/prettier
  ✖   7:1  Replace ↹Object.assign(t.context,·{script with ··Object.assign(t.context,·{·script·  prettier/prettier
  ✖  11:1  Replace ↹ with ··                                                                    prettier/prettier
  ✖  15:1  Replace ↹ with ··                                                                    prettier/prettier
  ✖  16:1  Replace ↹ with ··                                                                    prettier/prettier
  ✖  20:1  Replace ↹const·{script with ··const·{·script·                                        prettier/prettier
  ✖  21:1  Replace ↹ with ··                                                                    prettier/prettier
  ✖  25:1  Replace ↹const·{script with ··const·{·script·                                        prettier/prettier
  ✖  26:1  Replace ↹ with ··                                                                    prettier/prettier

  index.js:2:1
  ✖   2:1  Replace ↹ with ··                                                                    prettier/prettier
  ✖   3:1  Replace ↹↹config·=·{...config with ····config·=·{·...config·                         prettier/prettier
  ✖   4:1  Replace ↹↹ with ····                                                                 prettier/prettier
  ✖   6:1  Replace ↹↹ with ····                                                                 prettier/prettier
  ✖   7:1  Replace ↹ with ··                                                                    prettier/prettier
  ✖   9:1  Replace ↹ with ··                                                                    prettier/prettier
  ✖  10:1  Replace ↹↹ with ····                                                                 prettier/prettier
  ✖  11:1  Replace ↹ with ··                                                                    prettier/prettier

  17 errors

remark -qfo not terminated

remark -qfo not terminated after run git commit. I think it should be fixed with change
"*.md": ["remark -qfo", "git add"] to "*.md": ["remark . -qfo", "git add"] in lint-staged

Allow for custom prettier / xo settings

The one thing I need in my code is no semicolons (don’t judge! :-))

So right now the first thing I do after lass is to "fix" package.json accordingly.

I would like to have personal settings that lass uses. Could be environment variables or a config file in ~.

I guess that's somehow related to #12

Consider getting rid of npm-name

Right now the second biggest package in node_modules is lodash, used by npm-name for a feature we don’t even use.

I made a clone of this module without that feature. Using this one would improve npm i -g lass install time.

Allow scoped package creation

Currently we can't make scoped packages. This should allow using @USERNAME/PACKAGE_NAME.

➜  code lass @lad/mongoose
> Generating package in /Users/xo/code/@lad/mongoose
? What is the name of the new package (mongoose) 
>> Please change the name from "@lad/mongoose" to "lad-mongoose"

latest version fails

Hey, great package!

lass new-package doesn't work when using the latest version 1.0.13, when installed on node 10.x and npm 5.6.0 and osx highsierra 10.13.6. I also tried node 8.x to no avail.

Downgrading to 1.0.11 fixed the issue.

Error on package creation

I'm getting the following error creating a new package:

  test/test.js:1:14
  ✖   1:14  Do not use "require".  unicorn/prefer-module
  ✖   3:16  Do not use "require".  unicorn/prefer-module

  index.js:14:1
  ✖  14:1   Do not use "module".   unicorn/prefer-module

  3 errors
(node:86940) UnhandledPromiseRejectionWarning: Error: Command failed with exit code 1: ./node_modules/.bin/xo --fix
    at makeError (/Users/sebas/.npm-global/lib/node_modules/lass/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Users/sebas/.npm-global/lib/node_modules/lass/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async post (/Users/sebas/.npm-global/lib/node_modules/lass/sao.js:222:5)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:86940) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:86940) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Can you get me a hint on how to fix it?

licensing failure

Settings: version 1.0.11, node 10.x and 8.x, npm 5.6.0:

When selecting GPL-3.0 as the license during the 'lass new-package' process, I got this error:

Initialized empty Git repository in /Users/hoopda/Documents/TerraClear/new-package/.git/ TypeError: console.log.error is not a function at post (/usr/local/lib/node_modules/lass/sao.js:168:21) at kopy.then.stream (/usr/local/lib/node_modules/lass/node_modules/sao/lib/generate.js:226:40) at <anonymous>

Switching to MIT fixed the issue.

Symbols aren't escaped

For example in the readme we get this after using Lad's logger for the description.

> Lad&[#39](https://github.com/omgimalexis/lad-logger/issues/39);s logger

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.