polygon-io / client-js

The official JS client library for the Polygon REST and WebSocket API.
MIT License
190 stars 59 forks source link

Prevents publishing examples to npm #149

Closed tharnach closed 1 year ago

tharnach commented 1 year ago

This PR prevents /examples and .mocharc.json from being published to npm to save some bytes. Roughly 33% reduction in package size.

Before:

(base) ➜  client-js git:(master) npm publish --dry-run
npm notice 
npm notice 📦  @polygon.io/client-js@7.2.0
npm notice === Tarball Contents === 
npm notice 190B   .mocharc.json                                        
npm notice 3.0kB  CHANGELOG.md                                         
npm notice 1.1kB  LICENSE                                              
npm notice 2.2kB  README.md                                            
npm notice 9.8kB  dist/main.cjs                                        
npm notice 42.7kB dist/main.d.ts                                       
npm notice 8.9kB  dist/main.js                                         
npm notice 870B   examples/rest/configuration.js                       
npm notice 400B   examples/rest/crypto-aggregates_bars.js              
npm notice 346B   examples/rest/crypto-conditions.js                   
npm notice 350B   examples/rest/crypto-daily_open_close.js             
npm notice 344B   examples/rest/crypto-exchanges.js                    
npm notice 355B   examples/rest/crypto-grouped_daily_bars.js           
npm notice 318B   examples/rest/crypto-last_trade_for_a_crypto_pair.js 
npm notice 313B   examples/rest/crypto-market_holidays.js              
npm notice 306B   examples/rest/crypto-market_status.js                
npm notice 329B   examples/rest/crypto-previous_close.js               
npm notice 340B   examples/rest/crypto-snapshots_all_tickers.js        
npm notice 517B   examples/rest/crypto-snapshots_gainers_losers.js     
npm notice 368B   examples/rest/crypto-snapshots_ticker_full_book_l2.js
npm notice 352B   examples/rest/crypto-snapshots_ticker.js             
npm notice 316B   examples/rest/crypto-technical_indicators_ema.js     
npm notice 318B   examples/rest/crypto-technical_indicators_macd.js    
npm notice 317B   examples/rest/crypto-technical_indicators_rsi.js     
npm notice 316B   examples/rest/crypto-technical_indicators_sma.js     
npm notice 335B   examples/rest/crypto-tickers.js                      
npm notice 311B   examples/rest/crypto-trades.js                       
npm notice 397B   examples/rest/forex-aggregates_bars.js               
npm notice 341B   examples/rest/forex-conditions.js                    
npm notice 339B   examples/rest/forex-exchanges.js                     
npm notice 349B   examples/rest/forex-grouped_daily_bars.js            
npm notice 326B   examples/rest/forex-last_quote_for_a_currency_pair.js
npm notice 312B   examples/rest/forex-market_holidays.js               
npm notice 305B   examples/rest/forex-market_status.js                 
npm notice 326B   examples/rest/forex-previous_close.js                
npm notice 306B   examples/rest/forex-quotes.js                        
npm notice 316B   examples/rest/forex-real-time_currency_conversion.js 
npm notice 333B   examples/rest/forex-snapshots_all_tickers.js         
npm notice 513B   examples/rest/forex-snapshots_gainers_losers.js      
npm notice 349B   examples/rest/forex-snapshots_ticker.js              
npm notice 415B   examples/rest/forex-technical_indicators_ema.js      
npm notice 312B   examples/rest/forex-technical_indicators_macd.js     
npm notice 310B   examples/rest/forex-technical_indicators_rsi.js      
npm notice 310B   examples/rest/forex-technical_indicators_sma.js      
npm notice 330B   examples/rest/forex-tickers.js                       
npm notice 400B   examples/rest/indices-aggregates_bars.js             
npm notice 344B   examples/rest/indices-daily_open_close.js            
npm notice 314B   examples/rest/indices-market_holidays.js             
npm notice 307B   examples/rest/indices-market_status.js               
npm notice 329B   examples/rest/indices-previous_close.js              
npm notice 335B   examples/rest/indices-snapshots.js                   
npm notice 316B   examples/rest/indices-technical_indicators_ema.js    
npm notice 318B   examples/rest/indices-technical_indicators_macd.js   
npm notice 316B   examples/rest/indices-technical_indicators_rsi.js    
npm notice 316B   examples/rest/indices-technical_indicators_sma.js    
npm notice 338B   examples/rest/indices-ticker_types.js                
npm notice 337B   examples/rest/indices-tickers.js                     
npm notice 998B   examples/rest/launchpad/index.js                     
npm notice 1.2kB  examples/rest/launchpad/README.md                    
npm notice 415B   examples/rest/options-aggregates_bars.js             
npm notice 348B   examples/rest/options-conditions.js                  
npm notice 360B   examples/rest/options-contract.js                    
npm notice 322B   examples/rest/options-contracts.js                   
npm notice 359B   examples/rest/options-daily_open_close.js            
npm notice 346B   examples/rest/options-exchanges.js                   
npm notice 334B   examples/rest/options-last_trade.js                  
npm notice 314B   examples/rest/options-market_holidays.js             
npm notice 307B   examples/rest/options-market_status.js               
npm notice 344B   examples/rest/options-previous_close.js              
npm notice 326B   examples/rest/options-quotes.js                      
npm notice 380B   examples/rest/options-snapshots_option_contract.js   
npm notice 335B   examples/rest/options-snapshots_options_chain.js     
npm notice 315B   examples/rest/options-technical_indicators_ema.js    
npm notice 333B   examples/rest/options-technical_indicators_macd.js   
npm notice 331B   examples/rest/options-technical_indicators_rsi.js    
npm notice 331B   examples/rest/options-technical_indicators_sma.js    
npm notice 323B   examples/rest/options-ticker_details.js              
npm notice 309B   examples/rest/options-ticker_news.js                 
npm notice 336B   examples/rest/options-tickers.js                     
npm notice 327B   examples/rest/options-trades.js                      
npm notice 396B   examples/rest/stocks-aggregates_bars.js              
npm notice 346B   examples/rest/stocks-conditions.js                   
npm notice 340B   examples/rest/stocks-daily_open_close.js             
npm notice 312B   examples/rest/stocks-dividends.js                    
npm notice 331B   examples/rest/stocks-exchanges.js                    
npm notice 351B   examples/rest/stocks-grouped_daily_bars.js           
npm notice 313B   examples/rest/stocks-last_quote.js                   
npm notice 314B   examples/rest/stocks-last_trade.js                   
npm notice 313B   examples/rest/stocks-market_holidays.js              
npm notice 306B   examples/rest/stocks-market_status.js                
npm notice 325B   examples/rest/stocks-previous_close.js               
npm notice 305B   examples/rest/stocks-quotes.js                       
npm notice 334B   examples/rest/stocks-snapshots_all.js                
npm notice 513B   examples/rest/stocks-snapshots_gainers_losers.js     
npm notice 350B   examples/rest/stocks-snapshots_ticker.js             
npm notice 319B   examples/rest/stocks-stock_financials.js             
npm notice 311B   examples/rest/stocks-stock_splits.js                 
npm notice 311B   examples/rest/stocks-technical_indicators_ema.js     
npm notice 313B   examples/rest/stocks-technical_indicators_macd.js    
npm notice 311B   examples/rest/stocks-technical_indicators_rsi.js     
npm notice 311B   examples/rest/stocks-technical_indicators_sma.js     
npm notice 322B   examples/rest/stocks-ticker_details.js               
npm notice 308B   examples/rest/stocks-ticker_news.js                  
npm notice 336B   examples/rest/stocks-ticker_types.js                 
npm notice 335B   examples/rest/stocks-tickers.js                      
npm notice 305B   examples/rest/stocks-trades.js                       
npm notice 2.3kB  examples/websocket/advanced.js                       
npm notice 607B   examples/websocket/index.js                          
npm notice 2.0kB  package.json                                         
npm notice === Tarball Details === 
npm notice name:          @polygon.io/client-js                   
npm notice version:       7.2.0                                   
npm notice filename:      @polygon.io/client-js-7.2.0.tgz         
npm notice package size:  19.8 kB                                 
npm notice unpacked size: 108.3 kB                                
npm notice shasum:        6d3d947014d265e0a7f7636183b503949707955f
npm notice integrity:     sha512-umCYwxmacZHV8[...]AXu/4hCQEI6nA==
npm notice total files:   109                                     
npm notice 
npm notice Publishing to https://registry.npmjs.org/ (dry-run)
+ @polygon.io/client-js@7.2.0

After:

npm notice 📦  @polygon.io/client-js@7.2.0
npm notice === Tarball Contents === 
npm notice 3.0kB  CHANGELOG.md  
npm notice 1.1kB  LICENSE       
npm notice 2.2kB  README.md     
npm notice 9.8kB  dist/main.cjs 
npm notice 42.7kB dist/main.d.ts
npm notice 8.9kB  dist/main.js  
npm notice 2.0kB  package.json  
npm notice === Tarball Details === 
npm notice name:          @polygon.io/client-js                   
npm notice version:       7.2.0                                   
npm notice filename:      @polygon.io/client-js-7.2.0.tgz         
npm notice package size:  13.1 kB                                 
npm notice unpacked size: 69.6 kB                                 
npm notice shasum:        a0dd209742476f51044126665fe341e03835c2c9
npm notice integrity:     sha512-ug6IxtUH3dyuI[...]liovLUtIl7X3w==
npm notice total files:   7                                       
npm notice 
npm notice Publishing to https://registry.npmjs.org/ (dry-run)
+ @polygon.io/client-js@7.2.0
justinpolygon commented 1 year ago

LGTM