1.0.0 • Published 3 years ago

desertfox v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

설치

NPM과 같은 package manager를 통해 설치할 수 있습니다.

$yarn add desertfox
#OR
$npm install desertfox

템플릿 다운로드

$git clone desertfoxjs/app my-app
$cd my-app
$yarn # or npm install
$node src/index # Build

Webpack 또는 LiveServe와 같은 프로그램을 이용해 public/index를 실행하세요.

API

DesertFox

parse : DesertFox 파일을 HTML 파일로 컴파일한 것과 실행하는데 필요한 스크립트(js)를 변환합니다.
getElement : 소스코드에서 element를 찾습니다(1개 제한). 가장 앞에 있는 element의 위치, 코드 등을 변환합니다.
changeScripts : body에 있는 script 태그를 head로 옮깁니다(1개 제한). 가장 앞에 있는 script만 해당됩니다.
editHTML : head와 body를 수정합니다. 수정된 코드를 변환합니다.
build : DesertFox 파일을 읽고 컴파일합니다.

기타

dist/desertfox/page.js.default : HTML파일들을 컴파일하고 페이지를 생성합니다. 프로젝트 디렉토리의 public/dist에 javascript파일들이 생성됩니다.