All Projects → d4rkr00t → aik

d4rkr00t / aik

Licence: MIT license
Frontend Playground

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects
HTML
75241 projects

Projects that are alternatives of or similar to aik

Gistlyn
Run Roslyn Gists
Stars: ✭ 75 (+74.42%)
Mutual labels:  playground, repl
go-playground
GNU/Emacs mode that setup local Go playground for code snippets like play.golang.org or even better :)
Stars: ✭ 64 (+48.84%)
Mutual labels:  playground, repl
Testdrive
Quickly try out any Swift pod or framework in a playground
Stars: ✭ 1,612 (+3648.84%)
Mutual labels:  playground, prototyping
Inim
Interactive Nim Shell / REPL / Playground
Stars: ✭ 407 (+846.51%)
Mutual labels:  playground, repl
vue-code-view
A Vue 2 component like Vue SFC REPL `@vue/repl` : u can edit, run and preview the code effect display in real time on the web page.
Stars: ✭ 67 (+55.81%)
Mutual labels:  playground, repl
electron-vue-boilerplate
Simple boilerplate for building Vue app with Electron and Webpack.
Stars: ✭ 53 (+23.26%)
Mutual labels:  postcss
malluscript
A simple,gentle,humble scripting language for mallus, based on malayalam memes.
Stars: ✭ 112 (+160.47%)
Mutual labels:  repl
try-manubot
A repository to practice contributing to a Manubot manuscript
Stars: ✭ 35 (-18.6%)
Mutual labels:  playground
postcss-rem
PostCSS plugin to use rem units with optional pixel fallback.
Stars: ✭ 14 (-67.44%)
Mutual labels:  postcss
text-engine
A browser-based text adventure game engine and sample game
Stars: ✭ 146 (+239.53%)
Mutual labels:  repl
web-dojo
A dojo for JavaScript and more.
Stars: ✭ 20 (-53.49%)
Mutual labels:  playground
postcss-clean
PostCss plugin to minify your CSS with clean-css
Stars: ✭ 41 (-4.65%)
Mutual labels:  postcss
ocamline
👨🏻‍💻 Command line interface for user input
Stars: ✭ 32 (-25.58%)
Mutual labels:  repl
repl
Framework Agnostic REPL For Node.js. Used by AdonisJS
Stars: ✭ 76 (+76.74%)
Mutual labels:  repl
Carbon.Gulp
Carbon/Gulp is a delicious blend of tasks and build tools poured into Gulp to form a full-featured modern asset pipeline for Flow Framework and Neos CMS.
Stars: ✭ 15 (-65.12%)
Mutual labels:  postcss
postcss-define-function
PostCSS plugin for Sass-like function directive
Stars: ✭ 25 (-41.86%)
Mutual labels:  postcss
schema.tl
📜 Easy-to-use TL-Schema viewer
Stars: ✭ 55 (+27.91%)
Mutual labels:  playground
ShenScript
Shen for JavaScript
Stars: ✭ 40 (-6.98%)
Mutual labels:  repl
ML-Playground
A Playground for machine learning techniques
Stars: ✭ 97 (+125.58%)
Mutual labels:  playground
fortune
🔮Fortune is your friendly CSS properties framework.
Stars: ✭ 16 (-62.79%)
Mutual labels:  postcss



aik




aik hero image


Frontend Playground

NPM Version License Github Issues Travis Status Commitizen Friendly



This project aims to help to prototype faster and not supposed to be a part of any production-ready system. If you want solutions that are better for production use case you can take a look at the alternatives section down below.

Quick Start

npm i -g aik # install using npm cli
yarn global add aik # or install using yarn

aik index.js -o

# or using npm's npx

npx aik index.js

aik quick start

Table of Content

Usage

Usage
  $ aik filename.js

Options
  -b  --build       Build production version for given entry point. [Default output: dist]
  -u, --base        Base path with which URLs in build begins
  -p, --port        Web server port. [Default: 8080]
  -h, --host        Web server host. [Default: localhost]
  -n, --ngrok       Exposes server to the real world by ngrok.
  -o, --open        Opens web server URL in the default browser.
  -v, --version     Shows version.
  --help            Shows help.

Examples
  $ aik filename.js --port 3000 -n
  Runs aik web server on 3000 port with ngrok and react hot loader

  $ aik filename.js --build
  Builds filename.js for production use and saves the output to dist folder.

Examples

Features

Run web server with a JavaScript file

To start experimenting with new ideas is as simple as running a single command in your terminal:

aik index.js

Moreover, Aik:

  • Creates an entry point if it doesn't exist.
  • Chooses server port automatically if default one is in use.
  • Shows an error overlay, so you don't have to look at your terminal at all.

NPM Modules

For simplifying work with npm modules Aik takes care of:

Automatic installation of npm modules

Just add a require or an import statement in a JavaScript file and you are ready to go.

import react from "react";
import ReactDOM from "react-dom";

Pre-installing NPM Modules

If there is a package.json file, Aik will automatically pre-install npm modules defined in it, before trying to compile an entry point.

Custom templates

By default, Aik uses built-in into the "html-webpack-plugin" template, but it's easy to create your own. Just add an HTML file with the same name as the JavaScript file.

aik-test/
├── index.js
└── index.html

Important: Do not add script tag with src to the JavaScript file (in the example above to index.js) Aik will do it automatically.

Frameworks Support

Framework Autodetection

Aik parses an entry point in order to figure out framework that is being used in an application. It's done by analyzing imports e.g. import React from 'react'; will trigger react support. Also it's possible to manually specify framework if an entry point doesn't provide any clues by just adding a comment on top of the file:

// aik-mode: react

React

In order to enable hot loading and hot module replacement – an entry point of an application should export default a react component:

import React from "react";

export default function App() {
  return <div>My React App.</div>;
}

This will wrap react component in an RHL compatible wrapper enabling hot reloading for react components and also mounts component to an element with id = app.

Also, you can manually wrap your component in react-hot-loader wrapper as described in RHL's readme.

Latest and greatest technologies for frontend development

There are (an opinionated) set of technologies that will help you prototype faster. Aik uses preset-env for babel which contains all yearly presets. And also you don't have to worry about all these messy prefixes in CSS because there is an autoprefixer which will do it for you. Moreover, there is a little bit of syntactic sugar over CSS provided by PostCSS and PreCSS.

Cutom .babelrc files

If there is a .babelrc file in a project Aik will use it automatically. That allows for better customization of a build as well as adds an ability to experiment with latest, experimental, features that are not yet enabled in Aik by default.

Linting

Aik comes with set up linters. Nothing annoying about code style, only rules which help you find potential errors.

Production ready build

aik index.js --build

Build command produces optimized for production use bundle. This makes it easy to publish prototype to GitHub pages, Surge, Now or wherever you want. Important that assets urls are relative to the root:

<script type="text/javascript" src="/index.c699c867.js"></script></body>

If you want to host a build in a sub directory (e.g. https://my-web-site.com/sub-dir/) you should run Aik with the '--base' flag:

aik index.js --build --base "/my-sub-folder"

Now assets urls are relative to a specified base path:

<script type="text/javascript" src="/my-sub-folder/index.c699c867.js"></script></body>

Expose web server to the real world

Optionally, by providing '-n' flag you can expose web server to the real world using "Ngrok".

aik index.js -n # option for enabling ngrok

Great Messages

Highly inspired by create-react-app and some other places.

Dev Server Error

aik dev server error

Build Successfully Finished

aik build success

More examples here.

Other resources

Alternatives

Author

Stanislav Sysoev [email protected] https://sysoev.org

Contributors

Contributing

Contributions are highly welcome! This repo is commitizen friendly — please read about it here.

I'll appreciate any grammatical or spelling corrections as I'm not a native speaker.

License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].