Git Product home page Git Product logo

songpro-javascript's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

songpro-javascript's Issues

potential build issue

Hi, when installing this package from npm, it appears that only the license, readme, and package.json files are included in the node_modules folder. I checked out the project and attempted to build it, but got the following error about the babel version

ERROR in ./src/SongPro.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Requires Babel "^7.0.0-0", but was loaded with "6.26.3". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel. (While processing preset: "/home/chris/songpro-js/node_modules/@babel/preset-env/lib/index.js")
    at throwVersionError (/home/chris/songpro-js/node_modules/@babel/helper-plugin-utils/lib/index.js:65:11)
    at Object.assertVersion (/home/chris/songpro-js/node_modules/@babel/helper-plugin-utils/lib/index.js:13:11)
    at /home/chris/songpro-js/node_modules/@babel/preset-env/lib/index.js:188:7
    at /home/chris/songpro-js/node_modules/@babel/helper-plugin-utils/lib/index.js:19:12
    at /home/chris/songpro-js/node_modules/babel-core/lib/transformation/file/options/option-manager.js:317:46
    at Array.map (<anonymous>)
    at OptionManager.resolvePresets (/home/chris/songpro-js/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/home/chris/songpro-js/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/home/chris/songpro-js/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/home/chris/songpro-js/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at File.initOptions (/home/chris/songpro-js/node_modules/babel-core/lib/transformation/file/index.js:212:65)
    at new File (/home/chris/songpro-js/node_modules/babel-core/lib/transformation/file/index.js:135:24)
    at Pipeline.transform (/home/chris/songpro-js/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/home/chris/songpro-js/node_modules/babel-loader/lib/index.js:50:20)
    at Object.module.exports (/home/chris/songpro-js/node_modules/babel-loader/lib/index.js:173:20)

is it possible the latest build is broken?

Attributes should be on the Song object, not inside an attrs object

All other implementations of SongPro put the core attributes like title and author on the song object, but the Javascript library currently puts them under an attrs object. Additionally the README shows the non-attrs approach.

My preference is for the Javascript library to be consistent with all other libraries.

Expected:

let song = SongPro.parse(contents);

console.log(song.title);
console.log(song.artist);

Actual:

let song = SongPro.parse(contents);

console.log(song.attrs.title);
console.log(song.attrs.artist);

Not able to import into a project

I believe this package might be built in an odd way that does not allow for a standard way of importing it into a project.

I have tried a lot of different things, but in the end nothing works. See my efforts here on the StackOverflow question which I won't repeat in this issue: https://stackoverflow.com/questions/76285992/including-js-package-import-in-a-typescript-project

To summarize though, I have a TypeScript project and none of the following imports do anything

import * as songpro from 'songpro'
const songpro = require('songpro');
const songpro = require('SongPro');

For all of them the songpro object is totally empty when I log it to the console, it has no methods or properties on it.

I'd love to get any advice from you if I am doing something wrong, but if not it would be fantastic if this project used a standard module system to allow for easy importing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.