Git Product home page Git Product logo

ember-apply's Introduction

ember-apply

npm version CI

Automatic integration and configuration from the community.

See the Documentation.

This is a framework and ecosystem agnostic collection of recommended configurations, applied via automation, that is compatible with any kind of project, new and old.

Individual configurations may have conventions specific to a an ecosystem, but ember-apply, itself, can be used with Svelte, React, or whatever you want. The tools provided by ember-apply only require Node 16+.

Maybe most importantly, is that ember-apply can be used for any tool that wishes to use high-level project-management and transformation utilities. See #Public API.

npm (tag) npm (tag)

NOTE: this package is a slightly experimental and prone to some API or organizational changes -- but is committed to strictly following semver.

Usage

npx ember-apply <feature-name>

where <feature-name> is one of the options under #Features

Compatibility

  • Node 16 +
  • ESM

Features

tailwind

npx ember-apply tailwind

Automates the steps from Tailwind's installation docs

Known working capabilities:

  • JIT
  • Rebuilding during development

Assumptions

  • entrypoint for your app is located at app/index.html
  • entrypoint for your tests is located at tests/index.html
  • tailwind files are placed in config/tailwind/

embroider

npx ember-apply embroider

Automates the embroider migration from the classic ember build system for maximum-compatibility mode. See the Embroider docs

ssr

implementation tbd (pr's welcome!)

npx ember-apply ssr

Known working capabilities:

  • tbd

any package with as ESM with a default export

when using a package name for the <feature-name>, an ESM version of the package will attempt to be loaded and used, invoking the default export.

npx ember-apply @scope/feature-name

Local scripts may also be used. An example of this is maybe in a private monorepo where some scripts or packages aren't published to npm.

npx ember-apply ../../path/to/some/script.js # ESM required
# or
npx ember-apply ../../path/to/some/script.mjs

Adding a new applyable to this repository

  • clone this repository
  • create a packages/<ecosystem>/<feature>index.js file examples:
    • packages/ember/tailwind/index.js
    • packages/sveltekit/tailwind/index.js
  • have a function exported as the default export. within this function, you may import form ember-apply to use any of the utility functions. the only argument passed to this function is the working directory npx ember-apply was invoked from. how the <your-applyable> folder is managed is totally up to whomever implements and maintains that code.

For Transforming JS

JSCodeShift is used

For Transforming Ember Templates

ember-template-recast is used

For Transforming HTML

posthtml is used

Related Projects

  • preset GOAL (tbd): be compatible with npx apply

    • preset does not provide codemodding tools, but it does provide basic pattern-based transforming utilities, so it's a solid option. It also does not have built-in support for template transforms.
    • currently, preset forces the install of esbuild which fails due to having the security feature ignore-scripts enabled, so preset is a non-option for folks who care about security. (or who don't mind adding an allow-list for preset)

ember-apply's People

Contributors

dependabot[bot] avatar evoactivity avatar github-actions[bot] avatar jacobq avatar juice10 avatar nullvoxpopuli avatar renovate-bot avatar renovate[bot] avatar semantic-release-bot avatar

Watchers

 avatar

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.