mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
move files under packages/marko
This commit is contained in:
parent
fe172b1464
commit
2d5a2232f4
6
.gitignore
vendored
6
.gitignore
vendored
@ -16,7 +16,7 @@ coverage
|
|||||||
/test/generated/
|
/test/generated/
|
||||||
.nyc_output
|
.nyc_output
|
||||||
*.swp
|
*.swp
|
||||||
/dist/
|
/**/dist/
|
||||||
/test-dist/
|
/**/test-dist/
|
||||||
/test-generated/
|
/**/test-generated/
|
||||||
.vs/
|
.vs/
|
||||||
@ -7,9 +7,9 @@
|
|||||||
input.*
|
input.*
|
||||||
|
|
||||||
# generated
|
# generated
|
||||||
/dist/
|
/**/dist/
|
||||||
/test-dist/
|
/**/test-dist/
|
||||||
/test-generated/
|
/**/test-generated/
|
||||||
*.marko.js
|
*.marko.js
|
||||||
*.html.js
|
*.html.js
|
||||||
*.xml.js
|
*.xml.js
|
||||||
|
|||||||
158
README.md
158
README.md
@ -1,158 +0,0 @@
|
|||||||
<h1 align="center">
|
|
||||||
<a href="https://markojs.com/"><img src="https://raw.githubusercontent.com/marko-js/branding/master/marko-logo-medium-cropped.png" alt="Marko" width="250" /></a>
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<strong>A declarative, HTML-based language that makes building web apps fun 🔥</strong>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://www.npmjs.com/package/marko"><img alt="NPM" src="https://img.shields.io/npm/v/marko.svg"/></a>
|
|
||||||
<a href="https://gitter.im/marko-js/marko"><img alt="Gitter" src="https://badges.gitter.im/Join%20Chat.svg"/></a>
|
|
||||||
<a href="https://travis-ci.org/marko-js/marko"><img alt="Build Status" src="https://travis-ci.org/marko-js/marko.svg?branch=master"/></a>
|
|
||||||
<a href="https://codecov.io/gh/marko-js/marko"><img alt="Coverage Status" src="https://codecov.io/gh/marko-js/marko/branch/master/graph/badge.svg"/></a>
|
|
||||||
<a href="http://npm-stat.com/charts.html?package=marko"><img alt="Downloads" src="https://img.shields.io/npm/dm/marko.svg"/></a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p align="center">
|
|
||||||
<a href="https://markojs.com/docs/">Docs</a> ∙ <a href="https://markojs.com/try-online/">Try Online</a> ∙ <a href="#contributors">Contribute</a> ∙ <a href="#community--support">Get Support</a>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
# Intro
|
|
||||||
|
|
||||||
Marko is HTML _re-imagined_ as a language for building dynamic and reactive user interfaces.
|
|
||||||
Just about any valid HTML is valid Marko, but Marko extends the HTML language to allow
|
|
||||||
building modern applications in a declarative way.
|
|
||||||
|
|
||||||
Among these extensions are [conditionals](https://markojs.com/docs/conditionals-and-lists/#conditionals), [lists](https://markojs.com/docs/conditionals-and-lists/#lists), [state](https://markojs.com/docs/state/), and [components](https://markojs.com/docs/class-components/).
|
|
||||||
Marko supports both single-file components and components broken into separate files.
|
|
||||||
|
|
||||||
## Single file component
|
|
||||||
|
|
||||||
The following single-file component renders a button and a counter with the
|
|
||||||
number of times the button has been clicked.
|
|
||||||
|
|
||||||
**click-count.marko**
|
|
||||||
|
|
||||||
```marko
|
|
||||||
class {
|
|
||||||
onCreate() {
|
|
||||||
this.state = { count:0 };
|
|
||||||
}
|
|
||||||
increment() {
|
|
||||||
this.state.count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
style {
|
|
||||||
.count {
|
|
||||||
color:#09c;
|
|
||||||
font-size:3em;
|
|
||||||
}
|
|
||||||
.example-button {
|
|
||||||
font-size:1em;
|
|
||||||
padding:0.5em;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
<div.count>
|
|
||||||
${state.count}
|
|
||||||
</div>
|
|
||||||
<button.example-button on-click('increment')>
|
|
||||||
Click me!
|
|
||||||
</button>
|
|
||||||
```
|
|
||||||
|
|
||||||
## Multi-file component
|
|
||||||
|
|
||||||
The same component as above split into an `index.marko` template file,
|
|
||||||
`component.js` containing your component logic, and `style.css` containing your
|
|
||||||
component style:
|
|
||||||
|
|
||||||
**index.marko**
|
|
||||||
|
|
||||||
```marko
|
|
||||||
<div.count>
|
|
||||||
${state.count}
|
|
||||||
</div>
|
|
||||||
<button.example-button on-click('increment')>
|
|
||||||
Click me!
|
|
||||||
</button>
|
|
||||||
```
|
|
||||||
|
|
||||||
**component.js**
|
|
||||||
|
|
||||||
```js
|
|
||||||
module.exports = {
|
|
||||||
onCreate() {
|
|
||||||
this.state = { count: 0 };
|
|
||||||
},
|
|
||||||
increment() {
|
|
||||||
this.state.count++;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
```
|
|
||||||
|
|
||||||
**style.css**
|
|
||||||
|
|
||||||
```css
|
|
||||||
.count {
|
|
||||||
color: #09c;
|
|
||||||
font-size: 3em;
|
|
||||||
}
|
|
||||||
.example-button {
|
|
||||||
font-size: 1em;
|
|
||||||
padding: 0.5em;
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Concise Syntax
|
|
||||||
|
|
||||||
Marko also supports a beautifully concise syntax as an alternative to its HTML
|
|
||||||
syntax. Find out more about the [concise syntax here](https://markojs.com/docs/concise/).
|
|
||||||
|
|
||||||
```marko
|
|
||||||
<!-- Marko HTML syntax -->
|
|
||||||
<ul class="example-list">
|
|
||||||
<for|color| of=['a', 'b', 'c']>
|
|
||||||
<li>${color}</li>
|
|
||||||
</for>
|
|
||||||
</ul>
|
|
||||||
```
|
|
||||||
|
|
||||||
```marko
|
|
||||||
// Marko concise syntax
|
|
||||||
ul.example-list
|
|
||||||
for|color| of=['a', 'b', 'c']
|
|
||||||
li -- ${color}
|
|
||||||
```
|
|
||||||
|
|
||||||
# Getting Started
|
|
||||||
|
|
||||||
1. `npm install marko`
|
|
||||||
2. Read the [docs](https://markojs.com/docs/)
|
|
||||||
|
|
||||||
# Community & Support
|
|
||||||
|
|
||||||
| <a href="https://stackoverflow.com/questions/tagged/marko"><img src="https://user-images.githubusercontent.com/1958812/56055468-619b3e00-5d0e-11e9-92ae-200c212cafb8.png" height="50px"/></a> | <a href="https://gitter.im/marko-js/marko"><img src="https://user-images.githubusercontent.com/1958812/56055573-9c04db00-5d0e-11e9-9fd3-0395edf631a0.png" height="60px"/></a> | <a href="https://twitter.com/intent/tweet?hashtags=markojs"><img src="https://user-images.githubusercontent.com/1958812/56055707-07e74380-5d0f-11e9-8a59-d529fbb5a81e.png" height="40px"/></a> |
|
|
||||||
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| Ask and answer StackOverflow questions with the [`marko` tag](https://stackoverflow.com/questions/tagged/marko) | Come hang out in our Gitter chat room, ask questions, and discuss project direction | Tweet to [`@MarkoDevTeam`](https://twitter.com/MarkoDevTeam) or with the [`#markojs` hashtag](https://twitter.com/search?q=%23markojs&f=live) |
|
|
||||||
|
|
||||||
# Contributors
|
|
||||||
|
|
||||||
Marko would not be what it is without all those who have contributed ✨
|
|
||||||
|
|
||||||
<a href="https://github.com/marko-js/marko/graphs/contributors">
|
|
||||||
<img src="https://opencollective.com/marko-js/contributors.svg?width=890&button=false"/>
|
|
||||||
</a>
|
|
||||||
|
|
||||||
## Get Involved!
|
|
||||||
|
|
||||||
- Pull requests are welcome!
|
|
||||||
- Read [`CONTRIBUTING.md`](.github/CONTRIBUTING.md) and check out our [bite-sized](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3Adifficulty%3Abite-sized) and [help-wanted](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Ahelp-wanted) issues
|
|
||||||
- Submit github issues for any feature enhancements, bugs or documentation problems
|
|
||||||
- By participating in this project you agree to abide by its [Code of Conduct](https://ebay.github.io/codeofconduct).
|
|
||||||
|
|
||||||
# License
|
|
||||||
|
|
||||||
MIT
|
|
||||||
13769
package-lock.json
generated
13769
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
215
package.json
215
package.json
@ -1,164 +1,55 @@
|
|||||||
{
|
{
|
||||||
"name": "marko",
|
"name": "marko",
|
||||||
"version": "4.18.48",
|
"version": "4.0.0",
|
||||||
"license": "MIT",
|
"private": true,
|
||||||
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
"scripts": {
|
||||||
"scripts": {
|
"build": "node scripts/build.js",
|
||||||
"build": "node scripts/build.js",
|
"build-src": "node scripts/build.js src",
|
||||||
"build-src": "node scripts/build.js src",
|
"postinstall": "cd packages/marko && npm i",
|
||||||
"prepublish": "npm run build-src",
|
"precommit": "lint-staged",
|
||||||
"precommit": "lint-staged",
|
"test": "mocha --timeout 10000 ./packages/marko/test/*/*.test.js",
|
||||||
"test": "mocha --timeout 10000 ./test/*/*.test.js",
|
"test-ci": "npm run lint && npm run check-format && npm run test-generate-coverage",
|
||||||
"test-ci": "npm run lint && npm run check-format && npm run test-generate-coverage",
|
"test-coverage": "npm run test-generate-coverage && nyc report --reporter=html && opn ./coverage/index.html",
|
||||||
"test-coverage": "npm run test-generate-coverage && nyc report --reporter=html && opn ./coverage/index.html",
|
"test-generate-coverage": "nyc -asc npm test",
|
||||||
"test-generate-coverage": "nyc -asc npm test",
|
"lint": "eslint .",
|
||||||
"lint": "eslint .",
|
"format": "prettier \"**/*.{js,json,css,md}\" --write",
|
||||||
"format": "prettier \"**/*.{js,json,css,md}\" --write",
|
"check-format": "prettier \"**/*.{js,json,css,md}\" -l",
|
||||||
"check-format": "prettier \"**/*.{js,json,css,md}\" -l",
|
"codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
|
||||||
"codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov"
|
},
|
||||||
},
|
"devDependencies": {
|
||||||
"lint-staged": {
|
"babel-cli": "^6.24.1",
|
||||||
"*.js": [
|
"babel-core": "^6.24.1",
|
||||||
"eslint"
|
"babel-plugin-minprops": "^2.0.1",
|
||||||
],
|
"benchmark": "^2.1.1",
|
||||||
"*.{js,json,css,md}": [
|
"codecov": "^3.0.2",
|
||||||
"prettier --write",
|
"eslint": "^4.11.0",
|
||||||
"git add"
|
"eslint-config-prettier": "^2.9.0",
|
||||||
]
|
"husky": "^0.14.3",
|
||||||
},
|
"lint-staged": "^7.0.0",
|
||||||
"dependencies": {
|
"micromatch": "^3.0.4",
|
||||||
"app-module-path": "^2.2.0",
|
"mocha": "^5.0.1",
|
||||||
"argly": "^1.0.0",
|
"nyc": "^13.0.0",
|
||||||
"browser-refresh-client": "^1.0.0",
|
"prettier": "^1.13.5",
|
||||||
"camelcase": "^5.0.0",
|
"shelljs": "^0.7.7"
|
||||||
"char-props": "~0.1.5",
|
},
|
||||||
"complain": "^1.6.0",
|
"lint-staged": {
|
||||||
"deresolve": "^1.1.2",
|
"*.js": [
|
||||||
"escodegen": "^1.8.1",
|
"eslint"
|
||||||
"esprima": "^4.0.0",
|
],
|
||||||
"estraverse": "^4.3.0",
|
"*.{js,json,css,md}": [
|
||||||
"events-light": "^1.0.0",
|
"prettier --write",
|
||||||
"he": "^1.1.0",
|
"git add"
|
||||||
"htmljs-parser": "^2.7.1",
|
]
|
||||||
"lasso-caching-fs": "^1.0.1",
|
},
|
||||||
"lasso-modules-client": "^2.0.4",
|
"nyc": {
|
||||||
"lasso-package-root": "^1.0.1",
|
"exclude": [
|
||||||
"listener-tracker": "^2.0.0",
|
"**/benchmark/**",
|
||||||
"minimatch": "^3.0.2",
|
"**/scripts/**",
|
||||||
"property-handlers": "^1.0.0",
|
"**/coverage/**",
|
||||||
"raptor-regexp": "^1.0.0",
|
"**/test/**",
|
||||||
"raptor-util": "^3.2.0",
|
"**/test-dist/**",
|
||||||
"resolve-from": "^2.0.0",
|
"**/test-generated/**",
|
||||||
"self-closing-tags": "^1.0.1",
|
"**/dist/**"
|
||||||
"simple-sha1": "^2.1.0",
|
]
|
||||||
"strip-json-comments": "^2.0.1",
|
}
|
||||||
"warp10": "^2.0.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@marko/migrate": "^5.1.0",
|
|
||||||
"babel-cli": "^6.24.1",
|
|
||||||
"babel-core": "^6.24.1",
|
|
||||||
"babel-plugin-minprops": "^2.0.1",
|
|
||||||
"benchmark": "^2.1.1",
|
|
||||||
"bluebird": "^3.4.7",
|
|
||||||
"caller-path": "^2.0.0",
|
|
||||||
"chai": "^3.3.0",
|
|
||||||
"codecov": "^3.0.2",
|
|
||||||
"diffable-html": "^2.1.0",
|
|
||||||
"eslint": "^4.11.0",
|
|
||||||
"eslint-config-prettier": "^2.9.0",
|
|
||||||
"express": "^4.16.1",
|
|
||||||
"husky": "^0.14.3",
|
|
||||||
"it-fails": "^1.0.0",
|
|
||||||
"jquery": "^3.1.1",
|
|
||||||
"jsdom-context-require": "^1.0.1",
|
|
||||||
"lasso-resolve-from": "^1.2.0",
|
|
||||||
"lint-staged": "^7.0.0",
|
|
||||||
"marko-widgets": "^7.0.1",
|
|
||||||
"micromatch": "^3.0.4",
|
|
||||||
"mocha": "^5.0.1",
|
|
||||||
"nyc": "^13.0.0",
|
|
||||||
"prettier": "^1.13.5",
|
|
||||||
"request": "^2.72.0",
|
|
||||||
"shelljs": "^0.7.7",
|
|
||||||
"through": "^2.3.4",
|
|
||||||
"through2": "^2.0.1"
|
|
||||||
},
|
|
||||||
"main": "index.js",
|
|
||||||
"browser": {
|
|
||||||
"./compiler.js": "./compiler-browser.marko",
|
|
||||||
"./components.js": "./components-browser.marko",
|
|
||||||
"./index.js": "./index-browser.marko",
|
|
||||||
"./legacy-components.js": "./legacy-components-browser.marko"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"markoc": "bin/markoc"
|
|
||||||
},
|
|
||||||
"nyc": {
|
|
||||||
"exclude": [
|
|
||||||
"**/benchmark/**",
|
|
||||||
"**/scripts/**",
|
|
||||||
"**/coverage/**",
|
|
||||||
"**/test/**",
|
|
||||||
"**/test-dist/**",
|
|
||||||
"**/test-generated/**",
|
|
||||||
"**/dist/**"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"homepage": "http://markojs.com/",
|
|
||||||
"logo": {
|
|
||||||
"url": "https://raw.githubusercontent.com/marko-js/branding/master/marko-logo-small.png"
|
|
||||||
},
|
|
||||||
"repository": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/marko-js/marko.git"
|
|
||||||
},
|
|
||||||
"publishConfig": {
|
|
||||||
"registry": "https://registry.npmjs.org/"
|
|
||||||
},
|
|
||||||
"author": "Patrick Steele-Idem <pnidem@gmail.com>",
|
|
||||||
"maintainers": [
|
|
||||||
"Patrick Steele-Idem <pnidem@gmail.com>",
|
|
||||||
"Michael Rawlings <ml.rawlings@gmail.com>",
|
|
||||||
"Phillip Gates-Idem <phillip.idem@gmail.com>",
|
|
||||||
"Austin Kelleher <a@alk.im>",
|
|
||||||
"Dylan Piercey <pierceydylan@gmail.com>",
|
|
||||||
"Martin Aberer"
|
|
||||||
],
|
|
||||||
"keywords": [
|
|
||||||
"front-end",
|
|
||||||
"templating",
|
|
||||||
"template",
|
|
||||||
"async",
|
|
||||||
"streaming",
|
|
||||||
"components",
|
|
||||||
"ui",
|
|
||||||
"vdom",
|
|
||||||
"dom",
|
|
||||||
"morphdom",
|
|
||||||
"virtual",
|
|
||||||
"virtual-dom"
|
|
||||||
],
|
|
||||||
"files": [
|
|
||||||
"bin",
|
|
||||||
"dist",
|
|
||||||
"docs",
|
|
||||||
"helpers",
|
|
||||||
"src",
|
|
||||||
"browser-refresh.js",
|
|
||||||
"compiler-browser.marko",
|
|
||||||
"compiler.js",
|
|
||||||
"components-browser.marko",
|
|
||||||
"components.js",
|
|
||||||
"env.js",
|
|
||||||
"express.js",
|
|
||||||
"hot-reload.js",
|
|
||||||
"index-browser.marko",
|
|
||||||
"index.js",
|
|
||||||
"jquery.marko",
|
|
||||||
"legacy-components-browser.marko",
|
|
||||||
"legacy-components.js",
|
|
||||||
"node-require.js",
|
|
||||||
"ready.marko"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|||||||
158
packages/marko/README.md
Normal file
158
packages/marko/README.md
Normal file
@ -0,0 +1,158 @@
|
|||||||
|
<h1 align="center">
|
||||||
|
<a href="https://markojs.com/"><img src="https://raw.githubusercontent.com/marko-js/branding/master/marko-logo-medium-cropped.png" alt="Marko" width="250" /></a>
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<strong>A declarative, HTML-based language that makes building web apps fun 🔥</strong>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://www.npmjs.com/package/marko"><img alt="NPM" src="https://img.shields.io/npm/v/marko.svg"/></a>
|
||||||
|
<a href="https://gitter.im/marko-js/marko"><img alt="Gitter" src="https://badges.gitter.im/Join%20Chat.svg"/></a>
|
||||||
|
<a href="https://travis-ci.org/marko-js/marko"><img alt="Build Status" src="https://travis-ci.org/marko-js/marko.svg?branch=master"/></a>
|
||||||
|
<a href="https://codecov.io/gh/marko-js/marko"><img alt="Coverage Status" src="https://codecov.io/gh/marko-js/marko/branch/master/graph/badge.svg"/></a>
|
||||||
|
<a href="http://npm-stat.com/charts.html?package=marko"><img alt="Downloads" src="https://img.shields.io/npm/dm/marko.svg"/></a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://markojs.com/docs/">Docs</a> ∙ <a href="https://markojs.com/try-online/">Try Online</a> ∙ <a href="#contributors">Contribute</a> ∙ <a href="#community--support">Get Support</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
# Intro
|
||||||
|
|
||||||
|
Marko is HTML _re-imagined_ as a language for building dynamic and reactive user interfaces.
|
||||||
|
Just about any valid HTML is valid Marko, but Marko extends the HTML language to allow
|
||||||
|
building modern applications in a declarative way.
|
||||||
|
|
||||||
|
Among these extensions are [conditionals](https://markojs.com/docs/conditionals-and-lists/#conditionals), [lists](https://markojs.com/docs/conditionals-and-lists/#lists), [state](https://markojs.com/docs/state/), and [components](https://markojs.com/docs/class-components/).
|
||||||
|
Marko supports both single-file components and components broken into separate files.
|
||||||
|
|
||||||
|
## Single file component
|
||||||
|
|
||||||
|
The following single-file component renders a button and a counter with the
|
||||||
|
number of times the button has been clicked.
|
||||||
|
|
||||||
|
**click-count.marko**
|
||||||
|
|
||||||
|
```marko
|
||||||
|
class {
|
||||||
|
onCreate() {
|
||||||
|
this.state = { count:0 };
|
||||||
|
}
|
||||||
|
increment() {
|
||||||
|
this.state.count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
style {
|
||||||
|
.count {
|
||||||
|
color:#09c;
|
||||||
|
font-size:3em;
|
||||||
|
}
|
||||||
|
.example-button {
|
||||||
|
font-size:1em;
|
||||||
|
padding:0.5em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<div.count>
|
||||||
|
${state.count}
|
||||||
|
</div>
|
||||||
|
<button.example-button on-click('increment')>
|
||||||
|
Click me!
|
||||||
|
</button>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Multi-file component
|
||||||
|
|
||||||
|
The same component as above split into an `index.marko` template file,
|
||||||
|
`component.js` containing your component logic, and `style.css` containing your
|
||||||
|
component style:
|
||||||
|
|
||||||
|
**index.marko**
|
||||||
|
|
||||||
|
```marko
|
||||||
|
<div.count>
|
||||||
|
${state.count}
|
||||||
|
</div>
|
||||||
|
<button.example-button on-click('increment')>
|
||||||
|
Click me!
|
||||||
|
</button>
|
||||||
|
```
|
||||||
|
|
||||||
|
**component.js**
|
||||||
|
|
||||||
|
```js
|
||||||
|
module.exports = {
|
||||||
|
onCreate() {
|
||||||
|
this.state = { count: 0 };
|
||||||
|
},
|
||||||
|
increment() {
|
||||||
|
this.state.count++;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
**style.css**
|
||||||
|
|
||||||
|
```css
|
||||||
|
.count {
|
||||||
|
color: #09c;
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
.example-button {
|
||||||
|
font-size: 1em;
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Concise Syntax
|
||||||
|
|
||||||
|
Marko also supports a beautifully concise syntax as an alternative to its HTML
|
||||||
|
syntax. Find out more about the [concise syntax here](https://markojs.com/docs/concise/).
|
||||||
|
|
||||||
|
```marko
|
||||||
|
<!-- Marko HTML syntax -->
|
||||||
|
<ul class="example-list">
|
||||||
|
<for|color| of=['a', 'b', 'c']>
|
||||||
|
<li>${color}</li>
|
||||||
|
</for>
|
||||||
|
</ul>
|
||||||
|
```
|
||||||
|
|
||||||
|
```marko
|
||||||
|
// Marko concise syntax
|
||||||
|
ul.example-list
|
||||||
|
for|color| of=['a', 'b', 'c']
|
||||||
|
li -- ${color}
|
||||||
|
```
|
||||||
|
|
||||||
|
# Getting Started
|
||||||
|
|
||||||
|
1. `npm install marko`
|
||||||
|
2. Read the [docs](https://markojs.com/docs/)
|
||||||
|
|
||||||
|
# Community & Support
|
||||||
|
|
||||||
|
| <a href="https://stackoverflow.com/questions/tagged/marko"><img src="https://user-images.githubusercontent.com/1958812/56055468-619b3e00-5d0e-11e9-92ae-200c212cafb8.png" height="50px"/></a> | <a href="https://gitter.im/marko-js/marko"><img src="https://user-images.githubusercontent.com/1958812/56055573-9c04db00-5d0e-11e9-9fd3-0395edf631a0.png" height="60px"/></a> | <a href="https://twitter.com/intent/tweet?hashtags=markojs"><img src="https://user-images.githubusercontent.com/1958812/56055707-07e74380-5d0f-11e9-8a59-d529fbb5a81e.png" height="40px"/></a> |
|
||||||
|
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| Ask and answer StackOverflow questions with the [`marko` tag](https://stackoverflow.com/questions/tagged/marko) | Come hang out in our Gitter chat room, ask questions, and discuss project direction | Tweet to [`@MarkoDevTeam`](https://twitter.com/MarkoDevTeam) or with the [`#markojs` hashtag](https://twitter.com/search?q=%23markojs&f=live) |
|
||||||
|
|
||||||
|
# Contributors
|
||||||
|
|
||||||
|
Marko would not be what it is without all those who have contributed ✨
|
||||||
|
|
||||||
|
<a href="https://github.com/marko-js/marko/graphs/contributors">
|
||||||
|
<img src="https://opencollective.com/marko-js/contributors.svg?width=890&button=false"/>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
## Get Involved!
|
||||||
|
|
||||||
|
- Pull requests are welcome!
|
||||||
|
- Read [`CONTRIBUTING.md`](.github/CONTRIBUTING.md) and check out our [bite-sized](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3Adifficulty%3Abite-sized) and [help-wanted](https://github.com/marko-js/marko/issues?q=is%3Aissue+is%3Aopen+label%3Astatus%3Ahelp-wanted) issues
|
||||||
|
- Submit github issues for any feature enhancements, bugs or documentation problems
|
||||||
|
- By participating in this project you agree to abide by its [Code of Conduct](https://ebay.github.io/codeofconduct).
|
||||||
|
|
||||||
|
# License
|
||||||
|
|
||||||
|
MIT
|
||||||
|
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 8.6 KiB |
3733
packages/marko/package-lock.json
generated
Normal file
3733
packages/marko/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
117
packages/marko/package.json
Normal file
117
packages/marko/package.json
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
{
|
||||||
|
"name": "marko",
|
||||||
|
"version": "4.18.48",
|
||||||
|
"license": "MIT",
|
||||||
|
"description": "UI Components + streaming, async, high performance, HTML templating for Node.js and the browser.",
|
||||||
|
"dependencies": {
|
||||||
|
"app-module-path": "^2.2.0",
|
||||||
|
"argly": "^1.0.0",
|
||||||
|
"browser-refresh-client": "^1.0.0",
|
||||||
|
"camelcase": "^5.0.0",
|
||||||
|
"char-props": "~0.1.5",
|
||||||
|
"complain": "^1.6.0",
|
||||||
|
"deresolve": "^1.1.2",
|
||||||
|
"escodegen": "^1.8.1",
|
||||||
|
"esprima": "^4.0.0",
|
||||||
|
"estraverse": "^4.3.0",
|
||||||
|
"events-light": "^1.0.0",
|
||||||
|
"he": "^1.1.0",
|
||||||
|
"htmljs-parser": "^2.7.1",
|
||||||
|
"lasso-caching-fs": "^1.0.1",
|
||||||
|
"lasso-modules-client": "^2.0.4",
|
||||||
|
"lasso-package-root": "^1.0.1",
|
||||||
|
"listener-tracker": "^2.0.0",
|
||||||
|
"minimatch": "^3.0.2",
|
||||||
|
"property-handlers": "^1.0.0",
|
||||||
|
"raptor-regexp": "^1.0.0",
|
||||||
|
"raptor-util": "^3.2.0",
|
||||||
|
"resolve-from": "^2.0.0",
|
||||||
|
"self-closing-tags": "^1.0.1",
|
||||||
|
"simple-sha1": "^2.1.0",
|
||||||
|
"strip-json-comments": "^2.0.1",
|
||||||
|
"warp10": "^2.0.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@marko/migrate": "^5.1.0",
|
||||||
|
"bluebird": "^3.4.7",
|
||||||
|
"caller-path": "^2.0.0",
|
||||||
|
"chai": "^3.3.0",
|
||||||
|
"diffable-html": "^2.1.0",
|
||||||
|
"express": "^4.16.1",
|
||||||
|
"it-fails": "^1.0.0",
|
||||||
|
"jquery": "^3.1.1",
|
||||||
|
"jsdom-context-require": "^1.0.1",
|
||||||
|
"lasso-resolve-from": "^1.2.0",
|
||||||
|
"marko-widgets": "^7.0.1",
|
||||||
|
"micromatch": "^3.0.4",
|
||||||
|
"request": "^2.72.0",
|
||||||
|
"through": "^2.3.4",
|
||||||
|
"through2": "^2.0.1"
|
||||||
|
},
|
||||||
|
"main": "index.js",
|
||||||
|
"browser": {
|
||||||
|
"./compiler.js": "./compiler-browser.marko",
|
||||||
|
"./components.js": "./components-browser.marko",
|
||||||
|
"./index.js": "./index-browser.marko",
|
||||||
|
"./legacy-components.js": "./legacy-components-browser.marko"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"markoc": "bin/markoc"
|
||||||
|
},
|
||||||
|
"homepage": "http://markojs.com/",
|
||||||
|
"logo": {
|
||||||
|
"url": "https://raw.githubusercontent.com/marko-js/branding/master/marko-logo-small.png"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/marko-js/marko.git"
|
||||||
|
},
|
||||||
|
"publishConfig": {
|
||||||
|
"registry": "https://registry.npmjs.org/"
|
||||||
|
},
|
||||||
|
"author": "Patrick Steele-Idem <pnidem@gmail.com>",
|
||||||
|
"maintainers": [
|
||||||
|
"Patrick Steele-Idem <pnidem@gmail.com>",
|
||||||
|
"Michael Rawlings <ml.rawlings@gmail.com>",
|
||||||
|
"Phillip Gates-Idem <phillip.idem@gmail.com>",
|
||||||
|
"Austin Kelleher <a@alk.im>",
|
||||||
|
"Dylan Piercey <pierceydylan@gmail.com>",
|
||||||
|
"Martin Aberer"
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"front-end",
|
||||||
|
"templating",
|
||||||
|
"template",
|
||||||
|
"async",
|
||||||
|
"streaming",
|
||||||
|
"components",
|
||||||
|
"ui",
|
||||||
|
"vdom",
|
||||||
|
"dom",
|
||||||
|
"morphdom",
|
||||||
|
"virtual",
|
||||||
|
"virtual-dom"
|
||||||
|
],
|
||||||
|
"files": [
|
||||||
|
"bin",
|
||||||
|
"dist",
|
||||||
|
"docs",
|
||||||
|
"helpers",
|
||||||
|
"src",
|
||||||
|
"browser-refresh.js",
|
||||||
|
"compiler-browser.marko",
|
||||||
|
"compiler.js",
|
||||||
|
"components-browser.marko",
|
||||||
|
"components.js",
|
||||||
|
"env.js",
|
||||||
|
"express.js",
|
||||||
|
"hot-reload.js",
|
||||||
|
"index-browser.marko",
|
||||||
|
"index.js",
|
||||||
|
"jquery.marko",
|
||||||
|
"legacy-components-browser.marko",
|
||||||
|
"legacy-components.js",
|
||||||
|
"node-require.js",
|
||||||
|
"ready.marko"
|
||||||
|
]
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user