# anticore-quick-start

> Create your own anticore based project to build your app/site in seconds!

Latest version **0.9.3** (published 2019-01-23) · UNLICENSED license · 0 weekly downloads

## Install

```sh
npm install anticore-quick-start
pnpm add anticore-quick-start
yarn add anticore-quick-start
bun add anticore-quick-start
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.9.3 |
| Published | 2019-01-23 |
| First published | 2019-01-23 |
| Weekly downloads | 0 |
| License | UNLICENSED |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lcf.vs |
| Maintainers | lcf.vs |

## Links

- npm: https://www.npmjs.com/package/anticore-quick-start
- Repository: https://github.com/Lcfvs/anticore-quick-start
- Homepage: https://github.com/Lcfvs/anticore-quick-start#readme
- Issues: https://github.com/Lcfvs/anticore-quick-start/issues
- npm.io page: https://npm.io/package/anticore-quick-start

## Recent versions

- 0.9.3 (latest) — 2019-01-23

## README

# anticore-quick-start

Create your own [anticore](https://github.com/Lcfvs/anticore) based project to build your app/site in seconds!

## How to install it?

* Be sure to have **node.js** installed on your machine or install it: [node.js](https://nodejs.org/en/download/)
* Install this package **into your localhost directory**
  * On UNIX systems:
  ```shell
  project-dir=/var/www/html/project-name
  $ npm i -D @lcf.vs/anticore-quick-start --prefix $project-dir && cd $project-dir && npm run build
  ```
  * On Windows systems:
  ```cmd
  set project-dir=C:\wamp\www\project-name
  npm i -D @lcf.vs/anticore-quick-start --prefix %project-dir% && cd %project-dir% && npm run build
  ```
* Open your browser on your project index [http://localhost/project-name](http://localhost/project-name)
* Enjoy!

## Make your first middleware

Create a `./assets/js/dev/test.md.js`

```js
import { anticore } from 'anticore'
import { one } from 'anticore/dom/query/one'
import { replace } from 'anticore/dom/tree/replace'

// create a middleware to be applied on each element matching the `main.test` selector
anticore.on('main.test', function (element, next, loaded) {
  // replace the current main by the new one
  loaded && replace(element, one('main'))
  next() 
})
```

## Register your middleware

Import your middleware into your `./assets/js/dev/index.js`

```js
import {anticore} from 'anticore'
import './test.md.js'

anticore.defaults().populate()
```

## Build your app

**Into your localhost directory**, each time your JS code changes
```cmd
$ npm run build
```

## Create the content

Create a file into your project, for example `./fragments/test.html`

```html
<main class="test">This is the test content</main>
```

## Link it into your page

```html
<a href="./fragments/test.html">Load the test content</a>
```

---
_Source: https://npm.io/package/anticore-quick-start · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
