diff --git a/0.3.0.tar.gz b/0.3.0.tar.gz new file mode 100644 index 0000000..6015c0e Binary files /dev/null and b/0.3.0.tar.gz differ diff --git a/nodejs-levn.spec b/nodejs-levn.spec new file mode 100644 index 0000000..a75084b --- /dev/null +++ b/nodejs-levn.spec @@ -0,0 +1,63 @@ +%{?nodejs_find_provides_and_requires} +%global packagename levn +%global bootstrap 1 +%global enable_tests 0 +Name: nodejs-levn +Version: 0.3.0 +Release: 1 +Summary: Light ECMAScript Value Notation - human written, concise, typed +License: MIT +URL: https://github.com/gkz/levn +Source0: https://github.com/gkz/levn/archive/%{version}.tar.gz +Source1: https://raw.githubusercontent.com/gkz/levn/%{version}/package.json.ls +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch +BuildRequires: nodejs-packaging npm(prelude-ls) npm(type-check) +%if 0%{?enable_tests} +BuildRequires: mocha +%endif +%if !0%{?bootstrap} +BuildRequires: npm(LiveScript) +%endif +%description +Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, +flexible + +%prep +%autosetup -n levn-%{version} +cp -p %{SOURCE1} . + +%build +%if !0%{?bootstrap} +%{_bindir}/echo -e "\e[102m -=#=- Building from source -=#=- \e[0m" +rm -rf ./lib/ +mkdir ./lib/ +%{_bindir}/lsc --compile package.json.ls +%{_bindir}/lsc --output lib --bare --compile src/*.ls +rm -rf ./node_modules/ +%endif + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/levn +cp -pr package.json lib/ \ + %{buildroot}%{nodejs_sitelib}/levn +%nodejs_symlink_deps + +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%if 0%{?enable_tests} +%{_bindir}/mocha -R dot --ui tdd --compilers ls:livescript +%else +%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" +%endif + +%files +%{!?_licensedir:%global license %doc} +%doc *.md +%license LICENSE +%{nodejs_sitelib}/levn + +%changelog +* Thu Aug 20 2020 yaokai - 0.3.0-1 +- Package init diff --git a/nodejs-levn.yaml b/nodejs-levn.yaml new file mode 100644 index 0000000..dcfb358 --- /dev/null +++ b/nodejs-levn.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: gkz/levn +tag_pattern: "^" +seperator: "." diff --git a/package.json.ls b/package.json.ls new file mode 100644 index 0000000..1e282fb --- /dev/null +++ b/package.json.ls @@ -0,0 +1,42 @@ +name: 'levn' +version: '0.3.0' + +author: 'George Zahariev ' +description: 'Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible' +homepage: 'https://github.com/gkz/levn' +keywords: + 'levn' + 'light' + 'ecmascript' + 'value' + 'notation' + 'json' + 'typed' + 'human' + 'concise' + 'typed' + 'flexible' +files: + 'lib' + 'README.md' + 'LICENSE' +main: './lib/' + +bugs: 'https://github.com/gkz/levn/issues' +license: 'MIT' +engines: + node: '>= 0.8.0' +repository: + type: 'git' + url: 'git://github.com/gkz/levn.git' +scripts: + test: "make test" + +dependencies: + 'prelude-ls': '~1.1.2' + 'type-check': '~0.3.2' + +dev-dependencies: + livescript: '~1.4.0' + mocha: '~2.3.4' + istanbul: '~0.4.1'